Skip to main content
Known Participant
Feb 17, 2023 5:20 PM UTC
Question

Required Fields

I have an Excel sheet with formulas that I converted to a PDF.  In the Excel sheet I used the formula '=IF(NOT(ISBLANK(A5)), "Please select the size", "").  The first field on the PDF has a dropdown box for quantity (0-10).  If a user selects a quantity, other than zero, they are required to fill out the size and length fields.  How do I make the size field and the length field required if a quantity higher than zero is selected?

This topic is closed to new replies. Start a new post to keep the conversation going.

13 replies

Known Participant
Feb 21, 2023 7:53 PM UTC

am i able to share this file with someone directly and not post to the community?  i still dont have it working.

Translate
try67
Community Expert
Community Expert
Feb 17, 2023 5:52 PM UTC

As the custom Validation script of the drop-down you can enter something like this (adjust the field name as necessary, of course):

 

this.getField("size").required = (event.value!="0");

this.getField("length").required = (event.value!="0");

Translate
Known Participant
Feb 17, 2023 5:57 PM UTC

Please forgive my ignorance.  If the dropdown field is named Quantity where would I put this in the script so that size and then length are mandatory fields?

Translate
try67
Community Expert
Community Expert
Feb 17, 2023 6:01 PM UTC

Nowhere. You only need to specify the names of the other fields in this code.

Translate