Please help! Sum of values on radio buttons

barpageorge

New Member
Hello everybody!
I am new to Fabrik.
I am trying to do this:
A user is asked 5 questions and has to answer with radio buttons.
Each radio button has a value.
When he answers the questions and press save I want to calculate the sum of the values and reload with an answer depended on the sum.
It's like a psycological test.
You can see it here: teens.makeitreal.gr/test
I am trying 3 days, I searched the forum but I can't find a solution.
Thank you in advance!
 
Can you use calc element to sum up the raw values of buttons?
To get your button value:
$answervalue1 = '{table___element1_raw}';
$answervalue2 = '{table___element2_raw}';
$sum = $answervalue1 + $answervalue2;
return $sum;

then javascript plugin to show or hide next elements (questions) based on recieved value
 
I created i hidden calc element which sums the values.
Where I should put the javascript to hide the questions and the radio buttons and just display the answer?
 
The javascript should be enabled on click save button.
Then all questions should dissapear and display some answer depended on the sum
 
That calc element -> javascript -> action: blur (try focus .. somethin will work)-> select at the bottom: if this element == value (your value) -> then Hide -> select element you want to hide ....
repeat that for all the element questions as you need.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top