I have a form with a radiogroup called 'Opcoes' with item such as, for example:
22|Option 1
40|Option 2
350|Option 3
the values before options representing prices
I have a hidden field called 'Total' and a text box called 'Pax' which reflects the number of people to participate in activities defined by the radiogroup options.
What I want is to multiply the 'Pax' field by the value chosen by who is submitting the form, so 22, 40 or 350.
I tried this:
document.getElementById('Total').value = parseFloat((document.getElementById('Pax').value) * (document.getElementById('Opcoes').value))
but it doesn't work. Then I saw a thread derived from the script example named something like 'performing calculations with radio groups' but I can't adpat it to my case, or at least I'm too much a beginner to be able to do it. Can anybody help me, or put me into the right track, please?
May I add that in the submissions the values for the radiogroup and the pax fields are shown:(
Thanks