You know I can’t do the work for you If you are still getting only case 2 then you are either not calculating the total properly or not passing it to the input field. My function was only an example of how to modify the hidden input value and submit the form. You still need to merge it with your own code.
It’s actually not even calculating total at all as I’m finding out when I try to alert. I apologize, I’m a designer but am the only one in my office who knows anything about HTML (which apparently makes me an expert in all things web programming ). I initially tried looking for a plugin that would do this for me but was stuck coding it as a last resort.
I’m beginning to think that I should just scrap the javascript and do all the calculation in php. My dilemma is, however, is how to read both values from the form? The answer and the “value” of the points?
I converted it all to PHP in the end, it was much easier to do the calculations but thank you ever so much for your help. The forum doesn’t let me give you good karma yet, I think I need a certain amount of posts, but I will give it to you definitely once I get enough posts.
If some poor soul is trying to do the same thing I am here is a bit of my code.
Change my forms to this:
<fieldset><b>My experience level is:<br>
</b>
<label><input type="radio" name="Experience" value="5: brandNew">Brand New</label><br/>
<label><input type="radio" name="Experience" value="10: under 2 Years">Less than 2 years</label></br>
<label><input type="radio" name="Experience" value="15: 2 to 5 Years">2 - 5 years</label></br>
<label><input type="radio" name="Experience" value="20: 5 to 10 Years">5 - 10 years</label></br>
<label><input type="radio" name="Experience" value="30: over 10 Years">over 10 years</label></br>
and the php
[php]$totalPoints = 0;
$temp = explode( ": ", $_POST[“Experience”]);
$experience = $temp[1];
$points = $temp[0];
$totalPoints += $points;[/php]
@webtechstress, you need 25 posts or more in order to able to karma someone. However i clicked the karma + for you
Glad you figured out a solution