Questions answered by this recipe
How can I use PmWiki to generate XHTML's <fieldset>, <legend>, and <label> tags in my forms?
How can I easily add a button to a page that causes all checkboxes on that page to toggle to the opposite state?
Enter your recipe's description here.
Since a legend is only ever used in conjunction with a fieldset, it has been moved inside the fieldset tag, to eliminate the need for a separate (:legend:) tag. Similarly, the text of a label has been moved into the label tag to eliminate the need for a separate (:labelend:) tag. However, note that an input must have an id that matches the label.
(:input form:) (:fieldset "What is your favorite primary color?":) (:input radio color red id=red:) (:label red "Red like the sunset":)\\ (:input radio color green id=green:) (:label green "Green like the grass":)\\ (:input radio color blue id=blue:) (:label blue "Blue like the ocean":) (:fieldsetend:) (:input submit:) (:input end:)
The example code above will result in the three radio buttons being surrounded by a box with "What is your favorite primary color" at the top. The text beside each radio button will be clickable to activate the corresponding button. See a working example at http://www.essentialclarity.com/Coaching/SignUp . (Please don't submit the form unless you really want what it's offering.)
This recipe is called "Form Extensions" because I plan to add additional features soon. Here's my current wish list; feel free to add features you'd like to see.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
The difference is that if you click plain text, the checkbox doesn't change, but if you click a label, the checkbox (or radio button) changes just as if you had clicked it directly. It makes the form easier and faster to fill out. Ben Stallings
Oh I see now. But it is hard to see intuitively. Adding to pub/css/local.css the following will show a hand pointer when hovering over the lables: