I was using $F today to read the value of a SELECT element and found that if the value of one of the options is an empty string, the option's text is returned instead. For example in the code below, if One, Two Three or Four was the selected option then I'd get 1,2,3 or 4 from $F, but if the first option's selected then I get "--SELECT--" back.

Is this how $F is supposed to work?

Eifion

<select name="mr_select" id="mr_select">
<option value="">--SELECT--</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
</select>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to