Hi, i am trying to make a form with dinamic fields and i am using SQLFORM.factory. I have a table where i have a list of fields in my form.
in my controller i have: fields = [] for asset_class_attribute in asset_class_attributes: field_name = asset_class_attribute.asset_attribute_id.name fields.append(Field(field_name, requires=IS_NOT_EMPTY())) form = SQLFORM.factory(*fields) I my view u would like to do something like this: <fieldset> {{if asset_class_attributes:}} {{for asset_class_attribute in asset_class_attributes:}} <div> {{name = asset_class_attribute.asset_attribute_id.name}} {{=form.custom.label.name}} {{=form.custom.widget.name}} </div> {{pass}} {{pass}} {{form.custom.submit['_value'] = T("Spremi")}} {{=form.custom.submit}} </fieldset> I want to make name dynamic: {{name = asset_class_attribute.asset_attribute_id.name}} {{=form.custom.label.name}} {{=form.custom.widget.name}} How can i accomplish that? -- --- 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.