No objection. send me a patch.

On Jan 27, 9:45 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> On this same topic when you define an SQLFORM.factory() it appends
> 'no_table' as the name.
>
> Would it be difficult to add a way to pass a tablename to factory, so that
> my CSS will stay logical when I use SQLFORM or SQLFORM.factory?
>
> -Thadeus
>
> On Wed, Jan 27, 2010 at 8: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
>
> > On Jan 27, 12:23 am, Jeremy Dillworth <jdillwo...@gmail.com> wrote:
> > > I'm building an app where I am likely to want multiple SQLFORMs on the
> > > same view.
>
> > > Reading the manual I can see how this works using the formname
> > > argument on the SQLFORM.accepts method.
>
> > > I'm a little concerned about the HTML side of things, though. I've
> > > noticed that the HTML generated by default contains lots ids that will
> > > be duplicates if you have multiple forms (e.g. <tr
> > > id="submit_record__row">).
>
> > >   I'll probably want to write custom forms in my own HTML in the long-
> > > run anyway, but it looks like a lot of these ids could be CSS classes
> > > and maybe save me some trouble in cases where the SQLFORM default HTML
> > > is otherwise 'good enough' (in fact I've been having some fun and have
> > > a short function using xml.dom.minidom.parseString to move the ids to
> > > the class attribute and it seems to work ok).
>
> > > Is there any reason why the ids are needed (other than CSS perhaps)?
>
> > > If not, any chance of a future version of web2py using these as
> > > classnames?
>
> > > Thanks in advance and thanks for a cool web framework,
>
> > > Jeremy
>
> > --
> > 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<web2py%2bunsubscr...@googlegroups.com>
> > .
> > 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 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.

Reply via email to