JQuery would work for the dynamic form. On form submission you would have to manually validate the fields added by JQuery. It's not difficult, but you must remember to do it.
On Wednesday, February 5, 2014 10:11:51 AM UTC-5, Andrey K wrote: > > Dear web2py members, > I have a question for you. > I would like to make a dynamic form which looks like below picture (it is > easier to represent my question as a sketch rather than wording). > The form suppose to allow user to add tool with 1 or many parameters. > Form should consist of: > tool name, > tool description(text) and > as *many tool parameters* as user wants *dynamically.* > > Each parameter consist of *4 properties*: > default > value, > comment > (as string), > help (as > text), > data_type > (as list:string). > > I would like to save the form data into 3tables: db.tool and > db.tool_param and tool_ax (see below: mytables) > > I have been trying for several days to use following web2py UI elements: > list:string, > Field(IS_IN_SET([...],multiple=True), Field(SQLFORM.widgets.multiple.widget). > But I can't make exactly what I want. > > Can you please help me with this pazel? Any advice or suggestion - would > be greatly appreciated! > I would like to make a dynamic form which looks like below picture (it is > easier to represent my question as a sketch rather than wording). > The form suppose to allow user to add tool with 1 or many parameters. > Form should consist. > tool name, > tool description(text) and > as *many tool parameters* as user wants *dynamically*, > each parameter consist of *4 properties*: > default > value, > comment > (as string), > help (as > text), > data_type > (as list:string). > > I would like to save the form data into 3tables: db.tool and > db.tool_param and tool_ax (see below: mytables) > > > I have been trying for several days to use following web2py UI elements: > list:string, > Field(IS_IN_SET([...],multiple=True), Field(SQLFORM.widgets.multiple.widget). > But I can't make exactly what I want. > > Can you please help me with this pazel? Any advice or suggestion - would > be greatly appreciated! > > > <https://lh4.googleusercontent.com/-Dbcp9bbJw_A/UvJUJ9VeZ1I/AAAAAAAAC-A/1KGmh8Qpij4/s1600/p.jpg> > *mytables:* > db.define_table('*tool*', > Field('name', 'string'), > Field('description', 'text')) > > tool - stores name and description of the tools > > db.define_table('*tool_param*', > Field('tool', 'reference tool'), > Field('toolA1'), > Field('toolA2'), > Field('toolA3'), > Field('toolB1'), > Field('toolB2'), > Field('toolC1')) > > *tool_param - *store parameters of the tool. Each field name is > constracted like following: toolA_1 =db.tool.name +param#. > Except 'tool' - wich reference to db.tool.id > > db.define_table(*'tool_ax*', > Field('tool', 'reference tool'), > Field('default_value', 'string') > Field('data_type', 'string'), > Field('comment', 'string'), > Field('help', 'text')) > > *tool_ax** - *stores param properties > -- 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.