[Seaside] labelling radio buttons in a table
Tim Rowledge
tim@sumeru.stanford.edu
Fri, 14 Jun 2002 15:20:58 -0700
I'm making a table successfully from my potential multiple choice
answers -looks pretty good so far. However, I'd really like to find a
nice way to stick A -B-C etc next to the button, just like I do for the
non-table questions.
I haven't been able to find any hint of a way to do this from the W3C
website. I have some vague ideas about other approaches but they all
seem pretty likely to be ugly.
My current html method looks like this:-
html
^'[questionID]. [description]
<if sea:id="needsTable=true">
<form sea:id="chooseAnswer" >
<table border=1>
<tr>
<th> </th><th sea:id="hdr/tableHeaders">[hdr]</th>
</tr>
<tr sea:id="row/answerList">
<td><input type="radio"
sea:id="tableAnswersGroup"></td><td sea:id="col/row"> [col] </td>
</tr
</table>
<input type="submit" value="Answer">
</form
</if>
<if sea:id="needsTable=false">
<form sea:id="chooseAnswer" >
<ol type="A" >
<li sea:id="each/answerList"><input type="radio"
sea:id="answersGroup"> [each]
</ol>
<input type="submit" value="Answer">
</form>
</if>
<br>
<hr>
Choose the answer you think is correct and then press the
<b>Answer</b> button '
=======================
The least ugly thing I can come up right now is to make the #answerList
method add the $A(etc) to the beginning of each element and then use
COLSPAN=2 in the table defn to sort of fudge the letter onto the button.
Yucky. Can anyone thing of a better trick?
tim
--
tim@sumeru.stanford.edu