On 12/03/2008, kewei xiao <[EMAIL PROTECTED]> wrote:
> Hi guys
>
>     I am trying to wrap input box inside <label>...</label> for my
>  customized checkboxgroup, like this:
>
>    <label>
>        <input....../>
>    </label>

Do you strictly need this?
As long as the checkbox has an ID, the label will be given a for="id"
attribute so that the browser correctly associates the label with the
checkbox.

<input name="foo" type="checkbox" value="1" id="foo" />
<label for="foo">One</label>

It should also be possible to use CSS to make the checkbox render to
the right-hand side of the label, if that's what you want.

That said, If you want to change the generated markup, you'll have to
configure that element to use the TT template files, rather than using
the internal string method.

Copy the 'checkboxgroup_tag' file, edit it as necessary, then
configure the element to use your new file:

    type: Checkboxgroup
    render_method: 'tt'
    field_filename: 'new-filename'

You'll also have to make sure that the directory containing the
customized file is listed in
    $form->tt_args->{INCLUDE_PATH} = []


Carl

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to