You have three options:
1) You can make your own widget.
2) in controller or view
form.element(_name='permission')['_id']='public'
3) in view
<script>jQuery('input[name="permission"]').attr('id','public')</
script>
On Jan 13, 1:28 pm, "[email protected]" <[email protected]> wrote:
> Hi,
>
> I know that web2py can display form widgets simply by adding
>
> db.post.permission.widget = SQLFORM.widgets.radio.widget
>
> to the db.py file.
>
> However, I would like to customize the HTML generated from
>
> <td><input type="radio" name="permission" value="public"/></td>
> <td>public</td>
>
> to
>
> <td><input id="public" type="radio" name="permission" value="public"/></td>
>
> <td><label for="public">public</label></td>
>
> This way, the user can click the label for the radio button to select
> the item, rather than requiring them to click the small radio button.
> This would be great for usability.
>
> Thanks!
> Victor
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.