Since I generally prefer my HTML to look like HTML, I tend to use templates and here-docs, and eschew CGI.pm's HTML-generation features.
However, on my current project, I think these features could be useful -- if I can figure out how to do what I need to do. :-)
A fairly common feature in forms/surveys is a radio-select with an "Other" option, and a text field attached to the "Other" option, as follows:
I need to be able to optionally add (for example) a text field to any of the radio options. Does anyone know of a clean way to do this with CGI.pm, or am I better off writing my own HTML-generation routine?What is your favorite number?<br> <input type="radio" name="question" value="a">5</input><br> <input type="radio" name="question" value="b">7</input><br> <input type="radio" name="question" value="c">13</input><br> <input type="radio" name="question" value="d">Other (please specify:)< +/input> <input type="text" name="other"><br>
In reply to Creating HTML radio button group with text field by impossiblerobot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |