0

Is there a way to pass a value for an unchecked radio button or checkbox that is different from the value when it is checked? I'm using jQuery to serialize, so it would be good if there is an html or jQuery solution.

  • What do you mean with pass a value? If a checkbox or radio button is selected you logically POST that value; right? Please explain. – meavo Nov 12 '13 at 20:59
  • Doesn't HTML form submit do this by default, it the box is checked, the name and value is serialized, otherwise it's not, do you really need a specific value to be passed to figure out which it is -> http://jsfiddle.net/7VR4F/ – adeneo Nov 12 '13 at 21:00

1 Answers1

0

You can try making one radio button invisible, and pass it's value when nothing is checked (set it as default checked radio button)

Xyzk
  • 1,332
  • 2
  • 21
  • 36