Dear all, I've been playing for a while with web2py and read the major part of the book, but still I don't get with the correct answer for my problem. Here it goes: I want to display a form in some view. That form contains a common part (a field 'contact_email') and then three different 'subforms' enabled by three radio buttons (see attached picture).
<https://lh3.googleusercontent.com/-KeCkg0swSQ8/UxcNuzoEUtI/AAAAAAAAAc0/4djU7cE5g84/s1600/form.png> For the moment, I'm rendering it using a Form object in the controller: FORM(TABLE( TR( TD('Contact email:'), TD( INPUT(_name='email', _placeholder= 'cont...@research.edu', _class='input-medium', _value=(session.contact_email or ''), requires=IS_EMAIL(error_message='Please, enter a valid email address')) ) ), TR(TD(BR())), TR( TD(LABEL(INPUT(_type='radio', _name='operation', _value=USER_PDB, _checked=(not session.job_option orsession .job_option == USER_PDB), _onclick='toggle_input_option(this)' ), ' Upload PDB structures')) ), TR( TD('Receptor PDB:'), TD(INPUT(_name='pdb_receptor', _type='file')), _name='user_pdb_panel' ), TR( TD('Ligand PDB:'), TD(INPUT(_name='pdb_ligand', _type='file')), _name='user_pdb_panel' ), TR(TD(BR())), etc. Is there any other option of rendering this kind of form you could recommend me? Best regards, Brian -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.