Anthony, It is just a form with 2 sqlform.factory based on DB dropdown lists. 1st values passes to form.vars, second do not.
Is it possible to have many sqlform.factory based on DB dropdown lists on same form ?? Thanks.! On Wednesday, March 5, 2014 9:11:58 AM UTC-5, Anthony wrote: > > I don't think HTML allows nested forms. > > On Wednesday, March 5, 2014 1:29:57 AM UTC-5, [email protected] wrote: >> >> Hi all, >> >> I have a Nested SQLform.factory inside a custom fields form. >> >> My code: >> >> form = FORM(TABLE(TR("Numero de >> documento:",INPUT(_type="text",_name="noid",requires=IS_NOT_EMPTY()),requires=IS_NOT_IN_DB(db, >> >> 'tabla1.noid')), >> TR("Tipo de documento:" , >> SQLFORM.factory(Field('tid', label='', >> requires=IS_IN_DB(db,'tabla2.tipoid',orderby=db.tabla2.tipoid)) , buttons = >> [''] ,requires=IS_NOT_EMPTY())), >> >> TR("Nombre:",INPUT(_type="text",_name="nombre",requires=IS_NOT_EMPTY())), >> TR("Seleccione Tipo RH:" , >> SQLFORM.factory(Field('trh', label='', >> requires=IS_IN_DB(db,'tabla2.tiporh',orderby=db.tabla2.tiporh)) , buttons = >> [''] ,requires=IS_NOT_EMPTY())), >> TR("",INPUT(_type="submit",_value="Guardar")))) >> >> if form.accepts(request,session): >> >> db.tabla1.insert(noid=form.vars.noid,tid=form.vars.tid,nombre=form.vars.nombre,trh=form.vars.trh) >> >> >> Problem is, I only can get the 1st dropdown list option. Second i dont >> get it pass from form.vars. >> >> >> Can someone let me know what im doing wrong. Thnx. >> > -- 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/groups/opt_out.

