Thanks for the advice...
I'm not sure it will help for my making of several <div> group inside the
form, but it may be not necessary with the formstyle='divs' style.

On Sat, May 29, 2010 at 17:51, Yarko Tymciurak
<[email protected]>wrote:

>
> On May 29, 10:04 am, mdipierro <[email protected]> wrote:
> > Mind you also have the new
> >
> > form=SQLFORM(...,formstyle='divs')
> > form=SQLFORM(...,formstyle='table3cols')
> > form=SQLFORM(...,formstyle='table2cols')
> > form=SQLFORM(...,formstyle='ul')
>
> Note:  these canned styles were added in 1.77.1;   check the README
> file for info on them.
> Also note that you can set it to your own defined style:
>
> form=SQLFORM(..., _style='some inline style statements to modify
> things')
> form=SQLFORM(..., _class='your_defined_css_class')
>
> >
> > On May 28, 3:50 am, Mathieu Clabaut <[email protected]> wrote:
> >
> > > Ok... I'll try with that.
> >
> > > On Fri, May 28, 2010 at 03:11, Candid <[email protected]> wrote:
> > > > Use form.custom.widget. Seehttp://
> web2py.com/book/default/section/7/7
> > > > for details.
> >
> > > > On May 27, 4:48 pm, Mathieu Clabaut <[email protected]>
> wrote:
> > > > > Hello
> > > > > In my model, I've a table defined as
> >
> > > > > STATUS_TYPE = ('identification','analyse')
> >
> > > > > db.define_table('faq',
> > > > >     Field('status', 'string', requires=[IS_IN_SET(STATUS_TYPE,
> > > > > multiple=True),
> > > > >         IS_NOT_EMPTY(), IS_ORDERED(STATUS_TYPE)],
> > > > >         default=STATUS_TYPE[0],
> > > > >         widget=SQLFORM.widgets.checkboxes.widget),
> > > > >    Field('identification', 'text', requires=IS_NOT_EMPTY(),
> > > > notnull=True),
> > > > >     Field('identification_author',db.auth_user, default=me),
> > > > >     Field('identification_date', 'date', ),
> > > > >     Field('analyse', 'text'),
> > > > >     Field('analyse_author',db.auth_user),
> > > > >     Field('analyse_date', 'date'),
> > > > > )
> >
> > > > > I'd like the corresponding form to group fields beginning with
> > > > > 'identification' in a single <div name='identification'>, and the
> fields
> > > > > beginning with 'analyse' in a single <div name='analyse'></div> (so
> as I
> > > > can
> > > > > slide them up and down with a jquery depending of the status
> selection).
> >
> > > > > My question is : what is the best way to achieve that ?
> > > > > Is there a magical option in the Field initialisation ?
> > > > > Shall I define a customize form widget using
> form.customs.widget[field]
> > > > with
> > > > > a logic to encapsulate the wanted fields ?
> >
> > > > > I'm interested by your experience on this topic...
> >
> > > > > -Mathieu
> >
> > > > > PS. I guess it is quite a newbie question, but it is indeed the
> first
> > > > time I
> > > > > address form customization...
>

Reply via email to