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

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

Community Beginner ,
Nov 07, 2023 Nov 07, 2023

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
1.6K
Translate
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
2 ACCEPTED SOLUTIONS
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;

View solution in original post

Translate
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

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.

View solution in original post

Translate
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

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;
Translate
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

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? 

Translate
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

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.

Translate
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

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

🙂

Translate
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

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?

Translate
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
LATEST

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

Translate
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