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

Create a drop down list that will send a score to a separate field.

Community Beginner ,
Nov 07, 2023 Nov 07, 2023

Copy link to clipboard

Copied

I am creating a series of drop down menus to answer several questions, the responces will be:

 

1, Strongly Agree

2, Agree

3, Neutral

4, Disagree

5, Strongly Disagree

 

I then have a text box beside this which I would have a score, which is based on the number selected in the drop down menu.

So if someone selects " 1, Strongly Agree" I would see a score of 1 in the text field beside it.

Please can anyone guide me (baby steps needed as not a coder)

Thanks 🙂

TOPICS
How to , JavaScript , PDF forms

Views

716

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

correct answers 2 Correct answers

Community Expert , Nov 07, 2023 Nov 07, 2023

Set score points as export values of choices in dropdown.

Go to dropdown field properties, and click on 'Options' tab, under each choice where it says 'Export value' set your score.

Now click on 'Calculate' tab and as 'Custom calculation script' use this (Change "textfield" to your actual text field name):

this.getField("textfield").value = event.value;

Votes

Translate

Translate
Community Expert , Nov 07, 2023 Nov 07, 2023

If you mean from all score fields, go to field where you wish to show total score, under 'Calculate' tab select 'Value is the' Sum(+) and pick your fields.

Votes

Translate

Translate
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Copy link to clipboard

Copied

Set score points as export values of choices in dropdown.

Go to dropdown field properties, and click on 'Options' tab, under each choice where it says 'Export value' set your score.

Now click on 'Calculate' tab and as 'Custom calculation script' use this (Change "textfield" to your actual text field name):

this.getField("textfield").value = event.value;

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 Beginner ,
Nov 07, 2023 Nov 07, 2023

Copy link to clipboard

Copied

Thank you - I had the 'Export Value's already set so it was the script that did the hard work of pulling the data across.

May I ask how I could add all the scores together? 

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 ,
Nov 07, 2023 Nov 07, 2023

Copy link to clipboard

Copied

If you mean from all score fields, go to field where you wish to show total score, under 'Calculate' tab select 'Value is the' Sum(+) and pick your 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 Beginner ,
Nov 07, 2023 Nov 07, 2023

Copy link to clipboard

Copied

That is great - thank you ever so much - problem solved. 

🙂

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 ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

I am working on a similar document and have followed these steps. When I change the dorpown selection, the score in the other field doesn't change until I click on the other field. Is there a way to make it happen automatically?

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 ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

LATEST

Disregard. I just figured out that under Dropdown options I had to check the box"Commit Selected Value Immediately".

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