I have implemented AdvSearch functionality in my modx site. I got search result and all working good. I search value using dropdown select box.
For my dropdown select box I have four options.
When select any category except 'All' my search form show default option not the one I have selected before form submit.
I want selected option in form as I have selected before form submit. Means if I have selected "Category1" my search form will show "Category1" as selected. Now it shows "All"
with the Extra getReqParam installed:
<option value="2" [[!getReqParam:is=`2`:then=`selected="selected"`:else=``? &name=`the_name_of_your_select`]]>Category2</option>
or if fastField or pdoTools is installed with a fastField - GET - tag
Thanks for quick reply but getReqParam not working for me. Also my AdvSearch form display result after page refresh. In AdvSearch I have used queryHook to search custom tables.
[ed. note: jaimin10 last edited this post 5 years ago.]
Thanks allot for the great solution, I used it in custom form