Hi,
I am trying to help out a friend of mine who is working on a website for his new shop and as I only know very very basic HTML and CSS your help would be greatly appreciated.
The issue we are having is that he has a simple form that we are testing out that allows users to come on, click what they wish to order and submit. While they click what they wish to order, there is a text field in the bottom which updates with the price of their order. This script he found online and implemented without a problem.
Though we noticed when this form was submitted, the email would take the name of the input and the value and place them next to one another.
To explain a little better:
[CODE] <tr align=”center”>
<td><input type=”radio” name=”Bread” value=”1.99″ onclick=”this.form.total.value=calculateTotal(this);”></td>
<td><input type=”radio” name=”Bread” value=”2.35″ onclick=”this.form.total.value=calculateTotal(this);”></td>
<td><input type=”radio” name=”Bread” value=”2.75″ onclick=”this.form.total.value=calculateTotal(this);”></td>
<td><input type=”radio” name=”Bread” value=”1.70″ onclick=”this.form.total.value=calculateTotal(this);”></td>
<td><input type=”radio” name=”Bread” value=”2.50″ onclick=”this.form.total.value=calculateTotal(this);”></td>
<td> </td>
<td> </td>
</tr>
So for example if the user clicks the first bread with the value 1.99 then the email would show “Bread=1.99” and as we wished to use radio boxes so the user can only pick one, we need a way to read off the bread name.
We thought the easiest route would be to use javascript to take the selected value, store it with a variable and then run an if statement through the value and when it found the answer, we could display the name of the bread in a seperate field below the prices or hidden, as long as it appears within the email.
I know it can be done as some examples online look similar to what we were trying to achieve but our ability to do so is non-existant.
Is there a simple easy way to do this or could you direct me to a location which would take me through it step by step.
Thank you for anyone who reads and takes time out of their day to help with this issue, it is hugely appreciated.