Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Input Field Placeholder not working.?

<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url(home_url('/')); ?>">
  <input type="search" class="search rm-input" value="<?php echo get_search_query(); ?>" name="s" id="s" placeholder "Your name here"/>
  <input type="submit" style="display:none" id="searchsubmit" value="<?php echo esc_attr_x('Search', 'submit button'); ?>" />
</form>

I don't know why the placeholder text is not displaying in the field ...

enter image description here

like image 367
Sadia Avatar asked Dec 08 '22 22:12

Sadia


2 Answers

You missed out '=' Should be:

placeholder="Your name here"
like image 189
MuthaFury Avatar answered Dec 10 '22 10:12

MuthaFury


You forget = (equal) sign in your input fields.

<input type="search" class="search rm-input" value="<?php echo get_search_query(); ?>" name="s" id="s" placeholder="Your name here"/>
like image 37
user5876330 Avatar answered Dec 10 '22 12:12

user5876330