There seems to be a problem with having a zero(0) value in a select dropdown.

I am using select dropdown to do some minimum-maximum ranges on a field.

<select name="range-from:foo">
<option value="">Min Foo</option>
<option {if "0" IN ({low_search_range-from:foo})}selected="selected"{/if} value="0">0</option>
<select name="range-to:foo" id="property_number_of_bedrooms_to">
<option value="">Max Foo</option>
<option {if "0" IN ({low_search_range-to:foo})}selected="selected"{/if} value="0">0</option>

I tried choosing the option with value="0" and then submit. When I get back on the page, the option with the value="" is selected.

I tried outputting {low_search_range-from:foo} and {low_search_range-to:foo} and they both output a blank string.

It seems that low search probably type casted this to a string which returned a blank string.

How to solve this? I want to get 0 as my value literally when the option value is 0.

  • See getsatisfaction.com/low/topics/… -- Upgrade to latest version first, then see if problem persists. – Low Apr 10 '13 at 9:07
  • Ok. Upgrading to the latest version solved it. – developarvin Apr 10 '13 at 11:31
  • @arvinsim Can you post your comment as an answer for resolving your issue? – Anna_MediaGirl Apr 10 '13 at 11:57
  • @Anna_MediaGirl Low has posted it as the official answer. – developarvin Apr 11 '13 at 11:55

Adding this as an official answer. The question was related to Low Search version 2.1.2. Upgrading to the latest version (currently 2.3.0) solved this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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