I have a form to which I want to customize.
def apply_cms(): response.functionname=T('Application form CMS') response.image=URL(r=request,c='static',f='media/cms/banner.png') form=form_factory(SQLField('bedrijfsnaam',label='Bedrijfsnaam *',requires=IS_NOT_EMPTY()),\ SQLField('kvk_nummer',label='KvK-nummer *',requires=IS_NOT_EMPTY ()),\ SQLField('subdossiernummer',default='0000',comment='(alleen voor nevenvestigingen)'),\ SQLField('u_bent',label='U bent',requires=IS_IN_SET(['de heer','mevrouw'])),\ SQLField('initialen',label='Initialen *',requires=IS_NOT_EMPTY()), \ SQLField('voornaam',label='Voornaam *',requires=IS_NOT_EMPTY()), SQLField('tussenvoegsel'),\ SQLField('achternaam',label='Achternaam *',requires=IS_NOT_EMPTY ()),\ SQLField('telefoonnummer',label='Telefoonnummer *',requires=IS_NOT_EMPTY()),\ SQLField('email',label='E-mail *',requires=IS_NOT_EMPTY())) form[0][0][0].append(H3('Bedrijfsgegevens')) form[0][2][0].append(H3('Contactpersoon')) form[0][7][0].append(BR()) form[0][-1][1].append(INPUT(_type='reset',_value='Reset')) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick='javascript:history.go(-1)')) if form.accepts(request.vars,session): response.flash=T('') redirect elif form.errors: response.flash=T('form has errors') return dict(form=form) Adding the second header is working: form[0][2][0].append(H3('Contactpersoon')) The first header: form[0][0][0].append(H3('Bedrijfsgegevens')) should not be appended but prepended (I want the form to start with this header), but prepend is not defined as a function. How do I solve this. Furthermore, I would like to add a <br />, but this: form[0][7][0].append(BR()) isn't working. This reminded me that in tools'py's register functions it doesn't work either: td = form.element(_id="%s_%s__row" % (user._tablename, password))[1] td.append(BR()) td.append(INPUT(_name="password2", _type="password", requires=IS_EXPR('value==%s' % repr(request.vars.get (password,None)),error_message=self.messages.mismatched_password))) besides, the password2 field doesn't display a label. Kind regards, Annet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---