PDA

View Full Version : javascript disabled form field question


amykhar
01-18-2006, 05:12 PM
I have a form that has to have a certain behavior and it's giving me fits.

There is a checkbox on the form. If I check the box, it needs to disable some of the other form elements and fill them in with the values of some of the other form elements.

It works great, EXCEPT when I submit the form, the values for the disabled elements become empty.

Is there any way I can disable the elements for input, but still pass the values they contain into my php script?

I know I could do it on the php side and check to see if that checkbox is checkded and the values accordingly, but I'd rather not duplicate the effort since everything is filled in on the javascript side.

Amy

amykhar
01-18-2006, 05:28 PM
Never mind. I figured it out. I created a function to enable the fields again, and called it on submission of the form.