Closed gadgetto closed 10 years ago
The better way to remove the default text is to change the default lexicon.
Replace $_lang['advsearch.box_text'] = 'Search here...';
by $_lang['advsearch.box_text'] = '';
IMHO you can't initialize the default string thru the snippet call because you can have a multi-language site.
With HTML5 have you tried to use :
input type="text" id="[[+asId]]_advsea-search" name="[[+searchIndex]]" placeholder="[[+searchValue]]"
This can be set from the Manager's Lexicon setting. Just set "advsearch.box_text" empty
Is it currently possible to remove the default text ("Search here...") from the search input field?
Best solution I think would be if you can set the defaultString through a MODx tag value in AdvSearch form Chunk:
e.g. &defaultString=
Search here...
if this value is not set - the search input field will have no default text (this should even be empty by default).
My sites are all full HTML5 and I'm using the placeholder tag in HTML form elements instead, which is a more semantic way.
Thanks, Martin