I want it too look like the default rendering of {{=form}} - I just want an easy solution. I looked into the document but it only tells how to customize each and every element. I don't want that, I just want to start the form, display some custom stuff then show the main part of the form (table with labels and widgets) and close the form. >From what I know now I think what I have to do is to create a table manually with a loop through all elements, but I had the feeling that there might be a simpler way to do it than something like that
{{=form.custom.begin}} my things here {{= TABLE([TR(TH(item.lable),TD(item.widget)) for item in formitems]) }} {{=form.custom.end}} For that it also takes some code to get the formitems - also I am not sure if the validator warnings would appear?? Can't I do something like? {{=form.custom.begin}} my things here {{= form.elements}} {{=form.custom.end}} On Feb 13, 2:44 pm, DenesL <denes1...@yahoo.ca> wrote: > Since it is custom it all depends on what you want it to look like. > Have you readhttp://www.web2py.com/AlterEgo/default/show/205? > > On 13 feb, 07:10, selecta <gr...@delarue-berlin.de> wrote: > > > > > I want to add some elements to a form_factroy form while leaving the > > other form elements as they are. > > > My controller looks something like > > def test(): > > form = form_factory( > > Field('category'), > > Field('priority', 'integer', requires=IS_IN_SET([(1,'1 > > - Lowest'),(2,'2'),(3,'3'),(4,'4'),(5,'5 - Medium'),(6,'6'),(7,'7'), > > (8,'8'),(9,'9'),(10,'10 - Highest')], zero=None), default=1, label= > > "Change Priority"), > > ) > > ... > > > return dict(form = form, things = db(db.things.id>0).select()) > > > My test.html view looks something like > > {{=form.custom.begin}} > > {{for item in things:}} > > {{INPUT(_type='checkbox',name='thing_%s'%thing.id) ) }} <-these are > > the addidtional custom elements > > {{pass}} > > now i want to render the form elements (category and priority) - but > > how? > > {{=form.custom.end}} -- 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.