I am trying to have search results sorted by different fields according to which field is selected from a select box.
I have set up the following:
Field 1 = Category 1
Field 2 = Category 2
Field 3 = Category 3
Field 4 = Sort code for Category 1
Field 5 = Sort code for Category 2
Field 6 = Sort code for Category 3
The select box shows Category 1,2, and 3. I want the search results for Category 1 to be sorted by Field 4, the search results for Category 2 to be sorted by Field 5, and the search results for Category 3 to be sorted by Field 6.
Is this possible with an IF-ELSE statement in sub html_view_search?
Many thanks!
I have set up the following:
Field 1 = Category 1
Field 2 = Category 2
Field 3 = Category 3
Field 4 = Sort code for Category 1
Field 5 = Sort code for Category 2
Field 6 = Sort code for Category 3
The select box shows Category 1,2, and 3. I want the search results for Category 1 to be sorted by Field 4, the search results for Category 2 to be sorted by Field 5, and the search results for Category 3 to be sorted by Field 6.
Is this possible with an IF-ELSE statement in sub html_view_search?
Many thanks!