Skip navigation
Currently Being Moderated

Adding radio buttons

Jul 18, 2012 8:38 AM

Tags: #adding #values #radiobutton

Good Morning -

I'm creating a form with several radio buttons that each have their own value.  When they are clicked on, I want a numeric field at the bottom of the form to add the values for a total "score".

 

I've done this on another form and it works like a charm.  I cannot seem to get it to work the same on this form and it's driving me crazy!

 

I keep getting the following error....1.jpg

All the fields are defined as they should be.

2.jpg

 

Any ideas for me?

 
Replies
  • Currently Being Moderated
    Jul 18, 2012 12:17 PM   in reply to gretchenhs42

    Sounds to me like your radio buttons are probably in a subform making the object where your script is located out of scope. Make sure you reference your radio buttons with the subform they are wrapped in as well.

     

    A good tool is to click on the object you're referencing while holding the CTRL key down. Just make sure you see the flashing cursor in your script editor before doing that.

     

    Kyle

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 11:10 AM   in reply to gretchenhs42

    You can't access the values of the individual buttons themselves (as far as I know). You have to take the value of the radio button group.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2012 9:56 AM   in reply to gretchenhs42

    I'm trying to do something similar but don't know how to go about adding the nummbers for a total score.  Here's what my screen looks like.  However I'm wondering if I need to put just the numbers in a radio button group and the text in regular text fields because when I looked at the properties it's all mixed up.

     

    radio buttons.JPG

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 9:04 AM   in reply to gretchenhs42

    I appreciate your help, I didn't even noticed that I had like that already.  However, I did have problems with the calculation.  I had 3 seperate questions with a total of 16 different radio options

    so like question 1 had 4 options, question 2 had 6 options and question 3 had another 6 I tried doing the sum(rb11+rb2, etc.) but I got an error message stating it didn't know what RB1 was.  Then I realized that I had the radio buttons stored in a group.  Therefore to get it work I had to use, sum(GP1, GP2, GP3) and I got my total score.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points