db.define_table('thing',Field('color'))
form = SQLFORM(db.thing)
form.element('input[name=color]')['_class']='myclass'
^ you can use jQuery notation to select elements
(serverside)
On Dec 5, 9:02 pm, Andrew Evans <[email protected]> wrote:
> hmm ty that applied the class to the form I guess thats what I wrote.... But
> I mean applying it to an element of the form like an input text tag
>
> On Sun, Dec 5, 2010 at 6:49 PM, mr.freeze <[email protected]> wrote:
> > Like this?:
> > form = SQLFORM(db.thing, _class='myclass')
>
> > On Dec 5, 8:45 pm, Andrew Evans <[email protected]> wrote:
> > > hello I am trying to do a few things apply a css class and some
> > javascript
> > > code to a form generated by DAL ( I believe DAL is the right terminology)
>
> > > Basically I want to apply a CSS class to a form generated by web2pys
> > SQLFORM
> > > or CRUD
>
> > > Any ideas
>
> > > *cheers
>
>