|
Date: 5/6/2008 7:27 am · Subject: Re: Thingy Search Fields don't correspond with the Field Type. · Rating: 0
This is not a bug.
Perhaps one could have the option to make a search field the same type as the input field or a text box.
Have you read the Help for the search template? It says:
searchFields_form
A form element corresponding to this fields fieldType to search this field.
searchFields_textForm
A text input to search this field.
This gives you exactly the option you propose. If you use searchFields_form you get the same form element as the input field. If you use searchFields_textForm you get a text box.
So, in the default search template, all field types get a text box except for the otherThing field type. You can use this tmpl_var to indicate which searchable fields have the same type as their input field and which use a text box:
searchFields_is__fieldType__
A boolean indicating
wether this field is of type __fieldType__. The first letter of
__fieldType__ is always uppercase. Example: for a select box the value
of <tmpl_var searchFields_isSelectBox> is true.
If you have a lot of fields that use the input field type and also a lot that use a text box, then the template will get a little complicated. But i think in most cases only a few fields will be searchable.
I realise that this might not all be clear at first glance. So i'm open to suggestions to improve the explanation in the search template Help.
Yung
|