I have a form with some check boxes and a radio group, and simply removed the 'name' attribute from the check boxes to prevent them from being submitted. But radio groups need a name attribute for the client to know what belongs to each other. Can I prevent those radio buttons from being submitted with the form?
Asked
Active
Viewed 61 times
0
-
3just put them outside of ``form`` – doniyor Aug 01 '14 at 08:40
-
Or [remove them on submission](http://stackoverflow.com/a/3008071/1612146) – George Aug 01 '14 at 08:40
-
1...or simply ignore them on the server side. – James Donnelly Aug 01 '14 at 08:40
-
@doniyor That was simple. But worked fine in my case! Thanks... I belive submitting data that is ignored server side is not a good programming style but would work too. – Ercksen Aug 01 '14 at 08:45
1 Answers
1
just put those radio buttons outside of <form>
like
<form>
elements to submit
</form>
<input type="radio" /> <!-- won't be submitted -->

doniyor
- 36,596
- 57
- 175
- 260