• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: assign numeric values for selected radio button

assign numeric values for selected radio button 11 years 11 months ago #17762

  • cydonian
  • cydonian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hello,
I have a big survey form (3 pages, 100 questions with 3-4 options each) which consists of mostly radio button questions and a few checkbox questions. I need to assign a numeric value for every option in each question. So when a user selects an option (of a radio button or checkbox button) under a question, I will assign a numeric value to that option and I want to display numeric values at survey results (at submission part), instead of user selected options. Think it as if I am giving points for his each selection.

For example:
Question: How old are you? (radio button question)
option1:Between 10-20 years old (if user selects this, I will assign 5 for this selection)
option2:Between 20-30 years old (if user selects this, I will assign 4 for this selection)
option3:Between 30-40 years old (if user selects this, I will assign 3 for this selection)
option4:Between 40-50 years old (if user selects this, I will assign 2 for this selection)

If user selects "option2:Between 20-30 years old" as an answer to my question, then I want to display the result as "4" instead of "Between 20-30 years old" at submission (at survey results).

I checked "custom scripting" part in your web site but they are mostly for simple forms and there are not much professional examples. How can I do that I have written above? Should I use "additional attributes" for each question? Can you give me an example code for that question written above (how old are you?) ??
Thank you!
The administrator has disabled public write access.

Re: assign numeric values for selected radio button 11 years 11 months ago #17771

Just a suggestion -- you might try using the pipe in the data (see below)
5|Between 10-20 years old
4|Between 20-30 years old
3|Between 30-40 years old
2|Between 40-50 years old
This will put the first part in the database.

(I'm not a programmer so this may be way off the mark. But I use this in a number of my forms to get the value into the submission report.) Check out the Components/General info on the documentation page for more details.

K
The administrator has disabled public write access.
The following user(s) said Thank You: cydonian

Re: assign numeric values for selected radio button 11 years 11 months ago #17774

  • cydonian
  • cydonian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I tried your suggestion and it works for me, thank you :)
Now I need to send all submission data to admin email, do you have any idea how to do that?
The administrator has disabled public write access.

Re: assign numeric values for selected radio button 11 years 11 months ago #17775

First click on the Quick Add button in Properties to see all of the data that can be used to set up the email.
Then go to the Admin email selection in Properties and click on Edit email
Copy and paste the placeholder data that you want in the email. You should see placeholder codes like these {fieldname:caption}, {fieldname:value} etc. They can be formatted in the email so they make sense to you and the other people who are going to receive the email.
(I leave out Submit button and Captcha and any other non-essential things.)
Save/Close the edit window and then test the form to see if the format is correct. It usually takes a few tries for me to get it formatted the way I want.

Also check out this documentation page on some other new email suggestions. Under General
www.rsjoomla.com/support/documentation/v...e/57-components.html
K
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!