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

Form Field Help! If they answer YES then require a comment

New Here ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

Hello, I am new to this form creating and having to create a simple form with all yes & no responses, however after creating the drop down fields I get lost on the java script ( way over my head) I want to create a if/then statement in Acrobat. If they answer yes, additional comments must me answered.  If no, then no additional questions are needed.

TOPICS
PDF forms

Views

1.7K

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

So you want to make a field hidden or visible based on the selection in the drop-down, basically?

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

Hi, It does not have to be hidden, Working on a questionnaire set up  with yes / no answers on a drop downs . I wanted to require people to comment if they selected Yes on drop down. Sorry I am so new to this,  the creating part of the form was pretty user friendly for starters like me, but the java script  is a bit overwhelming after reading / seeing some tutorials, 

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

Then you need to define what "require" means. In what way should it be required? How should it be enforced?

Is the file being submitted back to you? If so, you can set the field's "required" property to prevent it from being submitted.

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

By require I meant,  If they answer yes on any of the questions, they will need to answer why they said yes in a  additional comment field that I need to set as required to fill out. 

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 ,
Jul 31, 2020 Jul 31, 2020

Copy link to clipboard

Copied

That doesn't answer my question, so let me rephrase: What should happen if they don't fill in that additional comments field?

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 ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

sorry, if they dont fill out tha additional field it will not let them submit the form. 

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 ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

LATEST

OK. In order to do that you need to set the field as required.

As the custom calculation script of the comments field you can enter something like this:

 

event.target.readonly = (this.getField("Dropdown1").valueAsString=="Yes");

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