Was the duplicate ID's bug ever fixed or addressed with an optional prefix
field? It currently looks like I would have to manually alter all the ID's
of my auth.login() form, because auth.register() form is on the same page.
On Wednesday, January 27, 2010 5:17:14 PM UTC-8, Jonathan Lundell wrote:
>
> 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 <[email protected]
> <javascript:>> 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 <[email protected]
> <javascript:>> wrote:
> >>>> Why not:
> >>>>
> >>>> form1=SQLFORM(..., _id="what_you_want")
> >>>>
> >>>> -wes
> >>>>
> >>>> On Wed, Jan 27, 2010 at 7:31 AM, mdipierro <[email protected]
> <javascript:>> 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>
>
>
>
--
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.