All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Plus sign being added to search query

Stephen 23 Aug 2016 10:43 problem, complete

Hi Low,

I've got an advanced search form which contains a 'Town' dropdown. I've just noticed it's only returning a single result for a certain town name, but it should be returning 2 results.

Looking at the search query string, I can see that a 'plus' symbol is being added to this town name in the URL. Do you have any ideas why may be causing this to happen?

/visiting/advanced-search/results?search:cf_event_town=Farnborough+&search:cf_event_opening_times=Thursday|Friday|Saturday|Sunday

I searched for a different town, and no plus sign was added, and all the results were returned as expected:

/visiting/advanced-search/results?search:cf_event_town=Bristol&search:cf_event_opening_times=Thursday|Friday|Saturday|Sunday

Thanks for any advice,

Stephen

Replies

  1. Low 23 Aug 2016 12:29

    Looks like there's a space in the dropdown option, which translates to a + in a query string. Can you see the space in the source code of the generated page?

  2. Stephen 23 Aug 2016 12:45

    Hi Low,

    Yes, you're right! One of the towns had a space after it. Sorry I didn't spot that myself. :-/

    Thanks,

    Stephen