Making fields un required if the are hidden:
I have some required fields that are visible when users click radio payment options, otherwise hidden. I need to have those hidden required fields become un required, so the form submits. I have tried everything I can think of and can not figure out how to make them un required when hidden. Here is the code javascript
I’m using:
// moCode radio button
EmailSubmitButtonM.presence = "visible";
MoCode.presence = "visible";
AuthMoCodeSignatory.presence = "visible";
AuthSignEmail.presence = "visible";
EmailSubmitButtonU.presence = "hidden";
UniCardNumber.presence = "hidden";
AuthUniCardSignatory.presence = "hidden";
ExpDate.presence = "hidden";
// Unicard radio button
EmailSubmitButtonU.presence = "visible";
AuthUniCardSignatory.presence = "visible";
UniCardNumber.presence = "visible";
ExpDate.presence = "visible";
EmailSubmitButtonM.presence = "hidden";
AuthMoCodeSignatory.presence = "hidden";
AuthSignEmail.presence = "hidden";
MoCode.presence = "hidden";
Thanks, Brennan
EX:
EmailSubmitButtonM.presence = "hidden";
EmailSubmitButtonM.mandatory= "error";
ExpDate.presence = "visible";
ExpDate.mandatory= "disabled";
This is a little differnt in Acrobat 7
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script