i am looking at the new search form that comes with ZP 1.4. i should start with the fact that i really love the fact that we can easily refine search results by just entering a new term in the form.
in the search option panel (admin back-end) we can select the fields on which the search should be performed. these fields are then listed in the searchextrashow list. they used to be checked by default but there are not anymore. the search itself is still working. this might be confusing for users because if nothing is checked the search should just return nothing.
anyway i think this comes from somewhere around line 4177 of the template-functions.php file (printSearchForm function). there is a mismatch between the $key values and the $query_fields values. if one replaces $key by $display in the in_array call (line 4179) then it works but i am not sure this is the way to do it.
frank
First let me say that I do not see what you are describing. If I select check a field on the back-end it does come up checked on the search form.
Regarding the code. $fields will have the values from the back end. $query_fields value may come from a number of places.
printSearchForm() function. If no parameter was passed, then$fields variable.The test for $key being in the $query_fields array will tell us if that field was "checked" in a previous life (see above.) Certainly in case 3 the key must be in the array since the arrays are identical. In case 2 the key will be in the array if the previous search had selected that field. In case 1, only the writer of the function call can know.
i have checked with zenpage theme and indeed things work. all selected fields come checked on the search form. sorry i didn't do this before to help.
now in zenpage the call to the search form is done with printSearchForm("","search","",gettext("Search gallery")). in fact if i do the same call within my theme it works as expected. the thing is i want to use my own reset icon and for this i need to put more options in the function call. here is what i did
printSearchForm( '','searchform','',gettext('SEARCH'),"$_zp_themeroot/images/search-drop.png",'','',"$_zp_themeroot/images/search-reset.png" ).
writing this post i realize i should have written printSearchForm( '','searchform','',gettext('SEARCH'),"$_zp_themeroot/images/search-drop.png",NULL,NULL,"$_zp_themeroot/images/search-reset.png" ). and of course with the function properly called, it works just fine even with my own reset icon.
mea culpa !