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

Populate Field from Radio Button Selection

New Here ,
Apr 03, 2025 Apr 03, 2025

Hello, 

I am creating an election form and I would like for the selection that is chosen to populate into a corresponding field. For example user selects "Employee Only - 1.99" the text field will show a value of $1.99. I also need a way to add if a person selects radio buttons 1-4 it will add the amount from box a and total in the final field. Is this possible? I have never used javascript before and I am absolutely stuck. There is a picture below of what the radio buttons look like. 

 

2025-04-03_14-19-15.PNG

TOPICS
How to , JavaScript , PDF , PDF forms
141
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
1 ACCEPTED SOLUTION
Community Expert ,
Apr 03, 2025 Apr 03, 2025

You don't actually need a script for this. Say the groups are named "HSA", "HRA", etc. Give each field in the group an export value (under Properties - Options) that matches its price, so the first field is "1.99", the second "2.99", etc. (with out the quotes!).

Then set the calculated value of the text field corresponding with that group to Sum and select the group's name from the list (just the one field). So "HSA" for "HSA Text", for example.

For the grand-total do the same, but select all four group names, and you're done!

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 ,
Apr 03, 2025 Apr 03, 2025

You don't actually need a script for this. Say the groups are named "HSA", "HRA", etc. Give each field in the group an export value (under Properties - Options) that matches its price, so the first field is "1.99", the second "2.99", etc. (with out the quotes!).

Then set the calculated value of the text field corresponding with that group to Sum and select the group's name from the list (just the one field). So "HSA" for "HSA Text", for example.

For the grand-total do the same, but select all four group names, and you're done!

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 04, 2025 Apr 04, 2025
LATEST

Thank you so much! This worked perfectly! 

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