[web2py] Re: Error in Custom Register Page in web2py

2014-01-03 Thread Akash Agrawall
Have to define all the attributes in custom form otherwise it won't run... wasn't doing the same. define it as hidden if you don't want user to see them. !! On Tuesday, December 31, 2013 5:54:34 PM UTC+5:30, Akash Agrawall wrote: Hie folks. When I click on submit button of the

[web2py] Re: Error in Custom Register Page in web2py

2014-01-03 Thread Anthony
No, it's better to set the readable and writable attributes to False if you want particular fields to be excluded from the form. for fields in ['field1', 'field2', 'field3']: db.auth_user[field].readable = db.auth_user[field].writable = False form = auth.register() Anthony On

Re: [web2py] Re: Error in Custom Register Page in web2py

2014-01-03 Thread Akash Agrawall
true that... this one is better.. On Fri, Jan 3, 2014 at 9:59 PM, Anthony abasta...@gmail.com wrote: No, it's better to set the readable and writable attributes to False if you want particular fields to be excluded from the form. for fields in ['field1', 'field2', 'field3']:

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Thanks for marking that error. but after changing that also same error. :( it's urgent... On Tuesday, December 31, 2013 8:33:54 PM UTC+5:30, Anthony wrote: At the end of the form, you have {{=form.custom.begin}}, but it should be {{=form.custom.end}}. On Tuesday, December 31,

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Anthony
Sorry, hadn't looked closely at the controller code. First, your first two lines are useless, as the third line simply overwrites the form variable with a completely new object. Second, auth.register() already handles the form processing, so you cannot subsequently call form.accepts(). If you

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Yaa thanx for pointing that out.. have removed the 3rd line it would be much helpful if you can explain the usage of auth.message On Thursday, January 2, 2014 8:55:07 PM UTC+5:30, Anthony wrote: Sorry, hadn't looked closely at the controller code. First, your first two lines

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Also if I remove the controller's flash line i.e. my new controller is: Controller: default.py def register(): form=auth.register() form.add_button('Cancel', URL('register')) return dict(form=form) Still it doesn't work i.e. it redirects to register.html with the data

[web2py] Re: Error in Custom Register Page in web2py

2013-12-31 Thread Anthony
At the end of the form, you have {{=form.custom.begin}}, but it should be {{=form.custom.end}}. On Tuesday, December 31, 2013 7:24:34 AM UTC-5, Akash Agrawall wrote: Hie folks. When I click on submit button of the CUSTOM REGISTRATION form. it redirects to the same page.. ?? No