How could I define a validation script including several elements?
My aim is to make a form where people can choose whether they want to pay just one day or two and choose the conditions. So dependent on the first choice there are added more variables.
So I set up a form calculating the sum. Every checked item is calculated. But I need a validation whether one of the single checkboxes for the days is chosen.
If I would use a Checkboxgroup or Radiogroup, then there would only the number sent, not the chosen value.
Or is it possible to grab this value for the mail to be sent?
Finally I want the people to get a message like: 'You booked day 1 for 35 $'.
thanks Tihana - I saw the posting how to calculate Radiovalues a while ago.
But my problem is, that I need a value to calculate, but the label should be posted as well.
This would be no problem, if I had just single Checkboxes - but I want the users to choose just one of one group. Therefore I should rather use a radiogroup.
But the label posted after sending the form is the label of the whole group and not the label of the single field.
So: is there a possibility to address the label of the selected item in a group?
by default this is not possible.
But there is an alternative.
1) add textfield or hidden input element to your form
2) go to your radio group->Advanced->ActionScript->check Custom->check Change and put:
function ff_nameofradiogroup_action(element, action)
vals = '';
opts = JQuery("[name=\"ff_nm_nameofradiogroup\"]");
for (o = 0; o < opts.length; o++)
vals = opts[o].value;
if (vals=="yes") // here you can add further dependencies
} // switch
} // ff_nameofradiogroup_action
-nameofradiogroup with name of your radio group (not title)
-nameoftextfieldorhiddeninput with name of your textfield or hidden input (not title)
-yes->is value of radiogroup, please replace it with yours
Yes->is label of radiogroup, please replace it with yours
After that when someone select radio group value, the title(label) of this selected value will be shown in textfield/hidden input