When a search is made from trip_search/advanced or trip_search/advanced/$content_type the results are returned on /trip_search. It would be helpful if the results are returned on the same URL from which the search was made.

Comments

Ian Ward’s picture

I have a potential solution. Not sure if it presents any usability problems, but so far it seems to work:

At the top of the function trip_search_form I added:
$referrer = $_SERVER['REQUEST_URI'];

then further down on this line i replaced trip_search as the post url w/ $referrer:

$form = '<div class="trip-search-form">' . form($form, 'post', url($referrer)) . '</div>';

as well as here (though tnot sure how this one will work, did not test using block:

 if ($short) {
      $form = form($form, 'post', url($referrer)); 

and here:

$form = form($form. theme('links', $f_links), 'post', url($referrer));

so now the user gets their search results printed on the page they initiated the search from. Perhaps a link to return to the main search page would be helpful, up at the top. Does anyone see any issues w/ this method?

Ian

nedjo’s picture

Status: Active » Closed (works as designed)

This is intentional. Like Google, we use the advanced search page to formulate a particular search, but refining it is done through the basic interface. This helps users learn the advanced operators for use in basic search, and avoids conflicts between advanced and basic input.