Why do you need classes to style the default widgets?
They are very simple, they basically just have an INPUT so you can do
form['_class']='myclass'
.myclass INPUT#name {
... style of the INPUT in the widget name in form...
}
There is nothing you cannot already do in CSS.
Massimo
On Nov 27, 11:19 pm, waTR <[email protected]> wrote:
> That sounds like it might work. I will look into it.
>
> Re: jQuery
> It becomes very messy when you have to do that. It is fine when the
> developer does the design and coding, but when working in a team you
> can't do that. You need to have a system in place where you have to do
> minimal modification/additional code to make the design work with the
> already enormous amounts of logic code.
>
> It should be built into the SQLFORM widget object. It doesn't seem so
> complicated to do. I will look into it and see.
>
> Though I am not intending to do anything that would affect backward
> compatibility here, this is rather a simple modification of what is
> already there and maybe add an additional optional field that takes a
> dictionary to modify the dictionary created by SQLFORM.custom.widget
>
> On Nov 27, 5:58 pm, Thadeus Burgess <[email protected]> wrote:
>
> > Try actually overriding the form widgets.
>
> > So you can override SQLFORM.widgets dictionary with your custom ones that
> > define your own classes.
>
> > You can see example widgets on web2pyslices.com for this purpose.
>
> > -Thadeus
>
> > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro <[email protected]> wrote:
> > > I am not sure this is a good idea. It is not necessary for the purpose
> > > of customization
> > > Moreover you can do it with jQuery
>
> > > jQuery('#table_password').addCladd('custom_1');
>
> > > On Nov 27, 6:55 pm, waTR <[email protected]> wrote:
> > > > I am wondering if anyone is working on adding a capability to set a
> > > > class for a single element in an SQLForm.custom.widget out of however
> > > > many are passed to it from a db.table. I.e.
>
> > > > You have a table named USER with Name, Email, Password.
> > > > Set Name <input> to class = "password OR string OR whatever is
> > > > default + custom_1 custom_2 custom_n". In addition, would be nice
> > > > to have access to size="" of <input> as well.
>
> > > > If no one is working on anything like this, I am interested in taking
> > > > a stab into this darkness...
>
> > > > Let me know if no one is working on this and I will put forward my
> > > > proposed design modification (in english, not code). If there is no
> > > > cries of outrage I will get it coded. Otherwise, I guess I might just
> > > > do it for my local copy only. I really need this facility to speed up
> > > > my forms creation--my app has a hundred or so, and all the CSS has
> > > > been done by an outside designer. I really don't want to modify his
> > > > design or CSS links. I just want to be able to plug the Input fields
> > > > and have the form start working.
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > > "web2py-users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<web2py%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/web2py?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.