On Jan 27, 2010, at 5:07 PM, Thadeus Burgess wrote: > Doesn't javascript input serialization expect to look the field up by id?
There's nothing *wrong* with having an id; it just needs to be unique on the page. > > it should be > > form = id = formname class=formname: > input: > class = formname > id = formname_field > > #formname input { ... } > #formname #formname_users_email { ... } > #formname .formname { ... } > > This would give a lot more flexibility from both a CSS design and a UI > design using jquery selection. > > -Thadeus > > > > > > On Wed, Jan 27, 2010 at 5:12 PM, Jonathan Lundell <jlund...@pobox.com> wrote: >> On Jan 27, 2010, at 2:30 PM, Thadeus Burgess wrote: >> >>> if it was defaulted to None we could go >>> >>> if _id == None then id = tablename else id = _id >>> >>> Id accept that, just set a unique id for each of my forms and nothing >>> will conflict and it will still keep good with old apps. >> >> And _id = False for no id at all. >> >> It's not that it isn't useful to put all of them into the same class; it's >> that class is the right way to do it, rather than id. >> >> >>> >>> -Thadeus >>> >>> >>> >>> >>> >>> On Wed, Jan 27, 2010 at 4:27 PM, Wes James <compte...@gmail.com> wrote: >>>> Why not: >>>> >>>> form1=SQLFORM(..., _id="what_you_want") >>>> >>>> -wes >>>> >>>> On Wed, Jan 27, 2010 at 7:31 AM, mdipierro <mdipie...@cs.depaul.edu> wrote: >>>>> The ids are only used for CSS. you can do >>>>> >>>>> form1=SQLFORM(...,_class='form1') >>>>> form1.accepts(request.post_vars,formname=None) >>>>> form2=SQLFORM(...,_class='form2') >>>>> form2.accepts(request.post_vars,formname=None) >>>>> return dict(form1=form1,form2=form2) >>>>> >>>>> and you can use the class to refer to the id of the first or the >>>>> second in CSS. There should be no ambiguity. >>>>> >>>>> Massimo >>>>> >>>>> >>>> >>>> <snip> -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.