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

Set value to radio buttons and get the sum of the selected radio buttons

New Here ,
Jul 05, 2021 Jul 05, 2021

Copy link to clipboard

Copied

Hi, 

I need help in setting values to radio buttons and getting the sum of the selected radio buttons. 

Please note that I am a novice and am excited to learn more about this. 

I am creating this form for a client and each radio button should have its value. 
For example,

Choice1 == "0"; 
Choice2 == "1";
Choice3 == "2";
Choice4 == "3";

it's the same with the rest of the radio buttons. 

Each question is grouped so in SCORE1, there are 5 groups. 


default3ex66hddfnl1_0-1625483515463.png


this is what I've done so far, setting a value for each radio button.. not sure if this is the best option. 

default3ex66hddfnl1_1-1625483732257.png

I'm really lost with the total text field where it should get the sum of the selected radio buttons only. 
So say in: 
Group1, Choice1 is selected then value is at 0;
then add the choice on group2 which is at 1 and so forth. 
Let me know how to go from here. Thank you! 

default3ex66hddfnl1_2-1625483830312.png

 

TOPICS
Acrobat SDK and JavaScript

Views

6.2K

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 1 Correct answer

Community Expert , Jul 05, 2021 Jul 05, 2021

Why not simply edit the Radio Button Choice values from "Choice1", "Choice2", etc. to "1", "2", etc.?

Then you could use the fields directly in the Sum option of the Calculate tab of your total text field. No scripts necessary.

Votes

Translate

Translate
Community Expert ,
Jul 05, 2021 Jul 05, 2021

Copy link to clipboard

Copied

Why not simply edit the Radio Button Choice values from "Choice1", "Choice2", etc. to "1", "2", etc.?

Then you could use the fields directly in the Sum option of the Calculate tab of your total text field. No scripts necessary.

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 06, 2021 Jul 06, 2021

Copy link to clipboard

Copied

Hi @try67 thank you for your response. It actually worked! I never thought it could be that simple. 
I have another issue: when doing a preview of the document on Adobe Acrobat, the calculations worked but when I saved the document, closed it and re-opened it to try ==it does not automatically calculate .. it looked like the calculations are not saved. 

Let me know how to move forward. Thank you! 

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 06, 2021 Jul 06, 2021

Copy link to clipboard

Copied

That should not be the case. What do you mean by "doing a preview in Acrobat", though?

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 06, 2021 Jul 06, 2021

Copy link to clipboard

Copied

Hi @try67  i explained my issue on this loom video: https://www.loom.com/share/0aecbe0d5eda4a30a637bcda16b1d7b1 

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 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

Do not use Apple Preview! It corrupts PDF files, especially form fields (as you saw), just by opening the file.

You should only view it using Adobe Reader or Acrobat.

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 17, 2022 Apr 17, 2022

Copy link to clipboard

Copied

Thank you, try67.  Just what I 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
New Here ,
May 02, 2024 May 02, 2024

Copy link to clipboard

Copied

How do you do get the total value when I have to group the first row for it able to have only one choice per row?

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 ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

The value of the group is the value of the selected field in it.

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 ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

Hello, Try67. I saw from the other discussions that you're active helping others... I'm wondering if you could help me as well. I'm a beginner on this one.
I'm having a problem to get the total sum of the collumn. From what I stated from the previous question, every row is group so that it functions that there's only one choice per row. I think that grouping hinders to get the total sum for column.
See picture for reference:
Screenshot 2024-05-04 at 12.05.47 AM.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
New Here ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

Another picture reference:
Screenshot 2024-05-04 at 12.17.28 AM.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
New Here ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

The Rows should get the effect of the column not the other way around. 

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 ,
May 03, 2024 May 03, 2024

Copy link to clipboard

Copied

That is very odd. In which application are you opening the file when this happens?

Can you share the file with us?

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 ,
May 07, 2024 May 07, 2024

Copy link to clipboard

Copied

LATEST

I use Adobe Acrobat. Sorry for the late response, I appreciate your help. But I resorted just to have one Total Sum Section- it's much easier than that multiple. 

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