>                     {{name = asset_class_attribute.asset_attribute_id.name
> }}
>                     {{=form.custom.label.name}}
>                     {{=form.custom.widget.name}}
>
> {{=form.custom.label[name]}}
{{=form.custom.widget[name]}}

Or maybe simplify as follows:

In the controller:

    names = [attribute.asset_class_attribute_id.name for attribute 
inasset_class_attributes
]
    fields = [Field(name, requires=IS_NOT_EMPTY()) for name in names]
    ...
    return dict(form=form, names=names)

In the view:

            {{for name in names:}}
                <div>
                    {{=form.custom.label <http://form.custom.label.name/>[
name]}}
                    {{=form.custom.widget <http://form.custom.widget.name/>[
name]}}
                </div>

Anthony

-- 

--- 
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.


Reply via email to