It is the same

def register():
   form=auth.register_form()
   form['_id'] = 'my_form_id'
   return dict(form=form)

On Feb 19, 11:42 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Yes but with crud, or in his case auth.register_form()
>
> -Thadeus
>
> On Fri, Feb 19, 2010 at 11:31 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > aha
>
> > form=SQLFORM(.....,_id='thisformid')
>
> > or
>
> > form['_id'] = 'thisformid'
>
> > the latter works with crud forms too. Remember that
>
> > class SQLFORM(FORM): ... is a helper.
>
> > On Feb 19, 11:03 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> >> he wants a HTML CSS id on the form.
>
> >> -Thadeus
>
> >> On Fri, Feb 19, 2010 at 6:41 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> >> > What do you mean by setting an ID?
>
> >> > On Feb 19, 2:05 am, arnaud <arnaud.masse...@gmail.com> wrote:
> >> >> Hi,
> >> >> I'm newbie with python and Web2Py. My problem : I want customize my
> >> >> register form.
>
> >> >> This is my code
>
> >> >> #model
> >> >> auth_table = db.define_table(auth.settings.table_user_name,
> >> >>     Field('first_name', length=128, default=''),
> >> >>     Field('last_name', length=128, default=''),
> >> >>     Field('email', length=128, default='', unique=True),
> >> >>     Field('password', 'password',length=256,readable=False,
> >> >> label='Password'),
> >> >>     Field('registration_key', length=128, default= '',writable=False,
> >> >> readable=False),
> >> >>     Field('orgUrl','string'),
> >> >>     Field('orgName','string'),
> >> >>     Field('orgAddress1','string',widget=patternNormal),
> >> >>     Field('orgAddress2'),
> >> >>     Field('orgZipCode'),
> >> >>     Field('orgCity1'),
> >> >>     Field('orgCountry','string'),
> >> >>     Field('orgDescription','text'),
> >> >>     Field('orgActivityDomain','string'),
> >> >>     Field('orgLogo','upload'),
> >> >>     Field('acceptCgi','boolean'),
> >> >>     Field('acceptMailing','boolean'),
> >> >>     Field('locale',default='fr_FR',writable=False,readable=False)
> >> >>     )
>
> >> >> #controller
> >> >> def register():
> >> >>     return dict(form=auth.register())
>
> >> >> #view
> >> >> {{=form.custom.begin}}
> >> >> {{=form.custom.widget.first_name}}
> >> >> ...
> >> >> {{=form.custom.end}}
>
> >> >> {{=form.custom.begin}} serialize this code : <form method="post"
> >> >> enctype="multipart/form-data" action="">
>
> >> >> I want to set an ID to this form. What's the best way for achieve my
> >> >> goal ?
>
> >> >> Thanks
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "web2py-users" group.
> >> > To post to this group, send email to web...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > web2py+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to