#15037 closed defect (fixed)
RadioButton: can't set blank ("") value
Reported by: | victoryismine06 | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | Dijit - Form | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I can't seem to find a way to make a null option for Radio Buttons when trying to bind the control to a string type. It either sends 'null' as a string or 'on' if I completely remove the value.
Example:
<label>Gender</label> <input name="Gender" dojotype="dijit.form.RadioButton" type="radio" value="M" /> <label>Male</label> <input name="Gender" dojotype="dijit.form.RadioButton" type="radio" value="F" /> <label>Female</label> <input name="Gender" type="radio" dojotype="dijit.form.RadioButton" checked="checked" value="" /> <label>Both</label>
I'm using MVC 3, when I look at the data posting to the controller, I either see "on" or "null" as string values. I also tried value="@String.Empty" to no avail...
This works fine with just HTML without Dojo so I'm assuming its a feature or bug in the control.
Change History (3)
comment:1 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Status: | new → assigned |
comment:2 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 9 years ago by
Summary: | String Radio Button can't return null → RadioButton: can't set blank ("") value |
---|
Just updating the summary, "" is not the same thing as null.
Note: See
TracTickets for help on using
tickets.
In [28199]: