Hi all,
I'm currently building a questionnaire and I've run into a head scratcher. Some of the questions require the user to give a number to represent the importance of the answer. Example:
Instruction: Please select the radio buttons according to your preferred option,
with 1 representing the most important down to 4 which for you is least important.
1) If you're worried or concerned about a health related issue - who are you more likely to consult first?
a. Mum
b. Dad
c. Doctor
d. Sibling(s)
The user must give a number to each answer, between 1 and 4, like the following:
1) If you're worried or concerned about a health related issue - who are you more likely to consult first?
a. Mum = 1
b. Dad = 3
c. Doctor = 2
d. Sibling(s) = 4
or
1) If you're worried or concerned about a health related issue - who are you more likely to consult first?
a. Mum = 4
b. Dad = 2
c. Doctor = 1
d. Sibling(s) = 3
The point is, they can't use the same number twice... so they're producing an order of importance to them.
What is the way to go about creating and validating this? I have grouped the radio buttons vertically which is great as it means the user can only choose 1, 2, 3 or 4 once in every question, but they're still able to stack 1, 2, 3 and 4 in to the same answer which is what I need to stop. It's almost as though I need to group the radio buttons vertically and horizontally.
Example dummy code:
<form>
<label>
Question 1<br />
If you're worried or concerned about a health related issue - who are you more likely to consult first?
</label>
<table>
<tr>
<td>Mum.</td>
<td><input type="radio" value="1" name="1.1" />1</td>
<td><input type="radio" value="2" name="1.2" />2</td>
<td><input type="radio" value="3" name="1.3" />3</td>
<td><input type="radio" value="4" name="1.4" />4</td>
</tr>
<tr>
<td>Dad.</td>
<td><input type="radio" value="1" name="1.1" />1</td>
<td><input type="radio" value="2" name="1.2" />2</td>
<td><input type="radio" value="3" name="1.3" />3</td>
<td><input type="radio" value="4" name="1.4" />4</td>
</tr>
<tr>
<td>Doctor.</td>
<td><input type="radio" value="1" name="1.1" />1</td>
<td><input type="radio" value="2" name="1.2" />2</td>
<td><input type="radio" value="3" name="1.3" />3</td>
<td><input type="radio" value="4" name="1.4" />4</td>
</tr>
<tr>
<td>Sibling(s).</td>
<td><input type="radio" value="1" name="1.1" />1</td>
<td><input type="radio" value="2" name="1.2" />2</td>
<td><input type="radio" value="3" name="1.3" />3</td>
<td><input type="radio" value="4" name="1.4" />4</td>
</tr>
</table>
</form>
Which still allows this: http://oi43.tinypic.com/2qn5i1g.jpg
Thanks in advance for any advice!