[pmwiki-devel] Select & Option Dropdown-list Markup

Ben Stallings Ben at InterdependentWeb.com
Tue Dec 12 10:13:19 CST 2006


marc wrote,
> Personally, I don't consider either of these fall into the complex forms 
> category - but I use them routinely. We could wrap the required markup 
> and function into a recipe, if you prefer.

I'm a convert -- I hadn't known about the label, fieldset, and legend 
tags, and I guess I had assumed sites that used them were using 
JavaScript or other tricks to get those effects.  It seems that the 
markup to produce these tags would be very simple, along the lines of

(:label opt1 "option one":)(:input radio option 1 id=opt1:)

to produce

<label for="opt1">option one</label>
<input type="radio" name="option" value="1" id="opt1" />

and

(:fieldset:)(:legend "Please enter your very personal information":)
...
(:fieldsetend:)

to produce

<fieldset><legend>Please enter your very personal information</legend>
...
</fieldset>

I'm planning to produce a FormExtensions recipe one of these days, along 
the lines of what Dom posted on 11/14 (subject: "adding features to 
input tags: best practice?"), to allow client-side validation with 
JavaScript.  If this markup doesn't end up in the core right away, we 
could easily include it in that recipe.  --Ben S.



More information about the pmwiki-devel mailing list