[html-formfu] Nested div block in fieldset block

Carl Franks fireartist at gmail.com
Wed Aug 8 08:44:22 GMT 2007


On 07/08/07, kewei xiao <kewei.xiao at nald.ca> wrote:
>
>     I have a customized select box which is wrapped around in a div
> class, now I am trying to include it in a fieldset like this:
>
>     ---
>     id: form
>     elements:
>       - type: block
>         tag: fieldset
>         elements:
>             - type: +Customized::SelectBox
>
>     But the result is that select box is always outside of fieldset.
> Can you give me some advise on this?  Thanks

It's maybe something your custom element is doing.
If I use a normal 'select' element, I get the following output, which
looks correct:

<form action="" id="form" method="post">
<fieldset>
<span class="select">
<select name="">
</select>
</span>
</fieldset>
</form>

btw, unless you're using multiple fieldsets, you can simply use
'auto_fieldset => 1' rather than adding your own.

p.s. - there's already a fieldset element, so you can just do { type
=> 'fieldset' } rather than { type => 'block', tag => 'fieldset' }.

Carl



More information about the HTML-FormFu mailing list