[web2py] Re: crud form errors

2014-01-16 Thread Anthony
It's up to you to code and style it as you like. Here's how web2py does it: https://github.com/web2py/web2py/blob/master/gluon/html.py#L1826. If you want it exactly as web2py does it, then just use form.custom.widget.fieldname instead of completely manual HTML. See http://web2py.com/books/defau

[web2py] Re: crud form errors

2014-01-16 Thread sasogeek
How do I highlight the fields with errors though? like it appears in the tutorials? example please. On Wednesday, 15 January 2014 14:41:11 UTC, Anthony wrote: > > Error messages are in form.errors.fieldname (if it is None, there is no > error for that field). > > On Wednesday, January 15, 2014 8

[web2py] Re: crud form errors

2014-01-15 Thread Anthony
Error messages are in form.errors.fieldname (if it is None, there is no error for that field). On Wednesday, January 15, 2014 8:49:23 AM UTC-5, sasogeek wrote: > > I have a crud login and registration form with my own html, I don't extend > the layout.html. How do I display the form errors when

[web2py] Re: CRUD Form

2012-01-13 Thread Anthony
Can you show your controller and view code? On Friday, January 13, 2012 2:03:26 AM UTC-5, tOlorun wrote: > > Hello everyone > > Please iam trying to submit a crud.create form > > which iam loading as a component via ajax > > my url is not the url is not pointing to the function of the crud form

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro
Yes. crud.settings.formstyle='divs'. Now you can position the divs any way you like with css. On Feb 16, 5:38 pm, greenpoise wrote: > Where is the limit? could I align the textboxes horizontally?? > > The code above worked did the reisizing! > > On Feb 16, 3:02 pm, Massimo Di Pierro > wrote: >

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread greenpoise
Where is the limit? could I align the textboxes horizontally?? The code above worked did the reisizing! On Feb 16, 3:02 pm, Massimo Di Pierro wrote: > On Feb 16, 7:09 am, Massimo Di Pierro > wrote: > > > given... > > from=crud.create() > > > you can do > > > form e in form.elemen

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro
On Feb 16, 7:09 am, Massimo Di Pierro wrote: > given... > from=crud.create() > > you can do > > form e in form.elements('input[type=text]'): e['size']=50; this is in controller (before {{=form}}. > or in JS > > jQuery('input[type=text]').css('width':'50px'): This after unless wrapper in

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread greenpoise
Is this before I call {{=form}} On Feb 16, 5:09 am, Massimo Di Pierro wrote: > given... > from=crud.create() > > you can do > > form e in form.elements('input[type=text]'): e['size']=50; > > or in JS > > jQuery('input[type=text]').css('width':'50px'): > > or better in CSS > > input[type=te

[web2py] Re: CRUD form customization - possible??

2011-02-16 Thread Massimo Di Pierro
given... from=crud.create() you can do form e in form.elements('input[type=text]'): e['size']=50; or in JS jQuery('input[type=text]').css('width':'50px'): or better in CSS input[type=text] {width: 50px;} On Feb 15, 10:59 pm, greenpoise wrote: > Sorry for a possible double post but hones

[web2py] Re: crud form with not all fields?

2010-05-02 Thread weheh
Have you tried table.field.readable=table.field.writable=False prior to form=crud...? This should disable the display and update of the specified fields. On May 2, 12:17 pm, Sverre wrote: > Is it possible to generate a form with crud only with some fields of a > table?

[web2py] Re: crud form with not all fields?

2010-05-02 Thread mr.freeze
I believe you will need to use the lower level SQLFORM for this. http://web2py.com/book/default/section/7/2 On May 2, 11:17 am, Sverre wrote: > Is it possible to generate a form with crud only with some fields of a > table?