Jump to content

How do I add up radio values from form, total and show text response


Guest demarchi

Recommended Posts

Guest demarchi

Hi,

 

I have a survey with 19 questions, each with radio buttons and different values assigned for each button within each question. I want to add up the values for the button selected in each question (answers from all questions are required), display the total, and then display one of 4 messages based on the total.

 

Any quick answers or solutions?

 

Thanks for any help!

 

Dale DeMarchi

Link to comment
Share on other sites

Sounds like you either need to use Javascript or PHP/ASP.NET for this. Only downside to Javascript is that it can be turned off, so it can't really be relied upon if you absolutely need it for functionality.

 

In either case, you'll need to grab the form values when the form is submitted, do the appropriate math, do an if statement to check what the total holds, and redisplay the page with the correct message.

 

I'm a bit better with PHP than I am with javascript, so if you decide to go with PHP, I may be able to help with that. With Javascript I would have to do a bit of research, but it shouldn't be that difficult.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...