I know that may sound as "not-really-a-reply", but can't you just switch
Field order in the table definition ?
On Tuesday, April 21, 2015 at 6:36:11 PM UTC+2, Kyle Flanagan wrote:
>
> I know you can specify the order of fields for the main view of an
> SQLFORM.grid using the optional fields parameter, however, whenever you
> choose to add a new record, the order seems to be dictated by the order in
> which the fields were created in the table definition. Is there a way to
> explicitly specify the order in which the fields are displayed on the
> create/edit form?
>
> E.g.
>
> db.define_table('ATable',
> Field('a', 'string'),
> Field('b', 'string'),
> Field('c', 'string'))
>
> grid = SQLFORM.grid(db.ATable)
>
>
> Will produce a grid that will produce a form for adding/editing a record
> with the order a, b, c. However, I need the order to be b, a, c.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.