These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to make one section required on form but not all fields

Suedesign
Registered: Jul 22 2008
Posts: 19

I'm a little confused on this one and I don't know how to begin to search this question in any javascript information sites.

I have a section called "Ship Method' on my form with checkboxes for four different methods.

I also have a section "Payment - Check One" for either C.O.D. or credit card with checkboxes for MC Visa Amex. If they check one of the credit card boxes, then they need to fill out card#, exp. date and name.

My questions are as follows:

Is it possible to make the "ship method" required, whereas, one of the checkboxes is required to be checked? I cannot figure it out without making each box required.

Is it possible to have the 'payment method' section required, whereas, they cannot submit the form unless one of the options (cod or credit card) is checked? To go even further, if they check credit card, then the following fields (card #, etc.) will need to be required.

Sorry to be so long, I just don't know a better way to ask these questions, nor how to do a search on this... your help and guidance would be greatly appreciated.

Sue

My Product Information:
Acrobat Standard 8.0, Macintosh
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You will need to use JavaScript. The "required" property of a field can be set programmatically, but a better approach is to set up a script the checks the fields for completeness and not set the required property of any fields. The script would check the fields and only allow the submit to take place if everything checks out. An advantage is you can provide more helpful feedback to the user than the generic one supplied by Acrobat. You can also do more sophisticated validations.

Are you submitting to a server, or using e-mail?

George
Suedesign
Registered: Jul 22 2008
Posts: 19
Thank you for your response. It will be submitted through e-mail.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
> It will be submitted through e-mail.There are several ways of doing this. How have you set up your Submit action, exactly?

George
Suedesign
Registered: Jul 22 2008
Posts: 19
Yes, I edited the 'submit form' field in the dialog box, chose PDF the complete document and entered a URL for the link - an email address.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
OK, that can work, but if it has to work with Reader, be aware that the form has to be enabled by Acrobat so the PDF has additional usage rights. The trouble is there is are licensing restrictions that you need to review and understand.

George