Latest Register Log In

+ Advanced Search

Combination Simple and Advanced Search

Combination Simple and Advanced Search
By
03/21/17

Sometimes you may wish to blend the simple search box and advanced field filter searches. As of version 10.1.6 Beta 4 and later, this is now possible.

Start with your advanced search form. To construct a custom advanced search form, one easy approach is to use your browser's "view source" option when viewing the advanced search page on your site. Then use ctrl+f to locate "Find Articles". Copy that whole box and then remove whichever article fields you don't want searched in your custom form.

To incorporate the simple search box into the custom advanced search box you've made, let's make it the first row of the table just below <table> like this:
<tr><td>Any searchable field</td><td><select name="condition">{FUNC_SIMPLESEARCHCONDITIONOPS}</select></td><td><input type="text" name="search" class="standardinput" placeholder="type your simple search term here"></td></tr>


If you prefer not to allow a choice of condition for the simple search, replace the condition selector with <input type="hidden" name="condition" value="{DEFAULTSEARCHTYPE}"> to use the default simple search type automatically.




Rating
Views 114 views. Averaging 0 views per day.