> Is there a way I can display fields by name instead of having to
> iterate to them in the list? And where can I find out more about
> value_for, params_for, error_for, etc.
Those functions accept both a widget instance and a widget name as a
parameter, you can do:
error_for('foo'), etc....
>
> Like something like this would be fantastic:
>
> x = MyTableForm(..., fields = [TextField('firstName',...)],...)
>
> class MyTableForm(TableForm):
> template = """
> ...
> <table>
> <tr py:if="field_exists('firstName')">
> <th><span py:replace="display_label_for('firstName')"/></th>
> <td>
> <span py:replace="display_field_for('firstName')"/>
> <span py:replace="display_error_for('firstName')"/>
> </td>
> </tr>
> </table>
> ..."""
Looks nice, I'll take a look into it when I get a chance... (though
patches are more than welcomed ;) BTW, "display_field_for" already
exists... just in case you've missed it.
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---