• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Required Fields

New Here ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

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?

TOPICS
How to , PDF forms

Views

3.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

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");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

Where in the code?  I don't know where to put quantity in the code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

jennifer28461489ef3d_0-1676658336159.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

You said it should happen if the selected value is not zero, no? That's what the script above checks.

But your Qty field doesn't look like a drop-down in the screenshot above. I don't see the arrow for selecting values. Are you sure it's not a text field? Could you share the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

I am not able to share the file.  The quantity field is a dropdown from 1-10.  The size and length fields are also dropdowns.  Yes, if someone selects a quantity, of say 2 Red and Navy jackets, they must input the size and length that is needed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

The script I provided will do that, if used correctly. If you can't share the file create a dummy file with just those fields and do it there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

Keep in mind, though, that the "required" property is only validated when the file is submitted. It has no effect when the file is saved, printed, etc., unless a special script is used to validate those required fields in those events.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2023 Feb 21, 2023

Copy link to clipboard

Copied

am I able to send you the file directly without posting in the community?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 21, 2023 Feb 21, 2023

Copy link to clipboard

Copied

You can email it to [try6767 at gmail.com].

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2023 Feb 21, 2023

Copy link to clipboard

Copied

LATEST

Thank you.  I sent it over

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2023 Feb 21, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines