Skip to main content
Participant
January 11, 2022
Question

Conditional and Required Fields

  • January 11, 2022
  • 3 replies
  • 555 views

One of my fields (Type field) I have is a drop down list with options RFC, ADM, REB. I would like to create a condition if either ADM or REB are selected from the drop-down list to require the user to select either a quarter checkbox or a month AND enter a year. Is this condition possible with the version of Adobe I am currently using?  The 2nd image below shows the options that I have available. Thank You.

 

 

 

This topic has been closed for replies.

3 replies

Thom Parker
Community Expert
Community Expert
January 13, 2022

First, read the bit on Form Level Validation here:

https://www.pdfscripting.com/public/Form-Data-Validation.cfm

 

Then lets us know exactly how you'd like the form to work when the required fields aren't filled in.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
BarlaeDC
Community Expert
Community Expert
January 13, 2022

HI,

 

This is possible but would require some JavaScript to be run as you have a choice between which fields they have to fill in, but you would have to control it all yourself, as you can just set fields to "Required" but this means they cannot be left blank.

 

So on your commit ( assuming you have followed the advice already given and are submitting the form) you would have to run a script to check the value of the field, and then check if your conditions are met, if they aren't then display something to the user, and if they are submit the form.

 

Otherwise the best you could hope for it to guide the user through alerts or showing and hiding of fields they need to fill in.

try67
Community Expert
Community Expert
January 11, 2022

What do you mean by "require the user"? Do you mean you want to set the fields as Required? Do you know that's only enforced if the file is submitted?