Coroico / AdvSearch

Dynamic content search add-on for MODx Revolution that supports results highlighting, faceted search and search in custom packages
21 stars 14 forks source link

Possibility to remove the default text (Search here...) in search input field #23

Closed gadgetto closed 10 years ago

gadgetto commented 12 years ago

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

Coroico commented 12 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]]"

goldsky commented 10 years ago

This can be set from the Manager's Lexicon setting. Just set "advsearch.box_text" empty