I'm trying to order my results from a Solspace user search, but I can't find any way of sending a field to sort on via the same form as the main search one. The search results page redirects to a unique URL without passing any of the original form params (via get/post).

I can think of ways to do it via Resource Router, or query string or cookie stuff, but none feel like the 'EE' way to do that.

i.e. how to get {something_to_order_by} from the top tag to the bottom?

{exp:user:search return="reports/members/results"}
  <input type="search" name="keywords" id="keywords" value="{keywords}" />
  <input type="text" name="custom_fields" id="custom_fields" value="{custom_fields}" />
  <input type="text" name="something_to_order_by" />

{exp:user:results orderby="{something_to_order_by}"}
    <th><a href="/reports/members/results/{segment_4}/order:something_to_order_by">custom_field</a></th>

1 Answer 1


You should be able to use orderby:


No need for curly braces around the field name.

Check your stack trace and see if the orderby is being included in the query.

  • Thanks Jim, yes that works in the results tag, but how would I pass that as a dynamic parameter from the search form? Any extra inputs I add inside the search form, don't seem to be passed through to the results page. Oct 30, 2017 at 9:04
  • I can see this would work for the standard users tag if I POSTed back a form with dynamic parameters, but I'd like to combine that with the User:Search keywords into one form. It seems like the search/results tag doesn't work with POSTed data. Oct 30, 2017 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.