View Full Version : Quick Form / Checkbox Disable Question

07-06-2006, 08:20 PM
Hey Guys,

I've got the following code being used to make a checkbox selected and readonly when a radio button value is selected:

document.myForm.valueName.checked = true;
document.myForm.valueName.disabled = true;

However when submitting the form values in email, the value of the checkbox won't submit with the checkbox value being disabled (if I comment out that second line, it works). Of course, I don't want the value able to be unselected.

Any suggestions? Can I make it readonly instead?


07-06-2006, 09:03 PM
You can enable the field onsubmit.

You can register an onclick handler that returns false.

You can store the real value in a hidden field and use the checkbox as a means of populating that field.

Those are mine. I favor the first and 2nd over the third.