Hello Rahul,

I think you should be able to access it as

    form.vars.agree

which would either be "on" or None.

Kind regards
Cornelius

Am 06.06.2012 13:45, schrieb rahulserver:
> I added this extra element to my sqlform (as given in web2py book
> chapter forms and validators):
> form = SQLFORM(db.yourtable)
> my_extra_element = TR(LABEL('I agree to the terms and conditions'), \
>                       INPUT(_name='agree',value=True,_type='checkbox'))
> form[0].insert(-1,my_extra_element)
> But when i tried to access it in view as
> {{=form.custom.widget.my_extra_element}} (between form.custom.begin
> and form.custom.end) i am getting a none instead of a checkbox.
>
> {{=form}} does give the output as desired. But i wish to make a few
> customizations in the form so i am trying the custom form
> approachfo.So what is the way to access the extra sqlform elements
> from views?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to