I'm looking to have a default value in a rendered form element. eg. <input ... value="x">
Mostly I'm following the tutorial here: http://turbogears.org/2.0/docs/main/ToscaWidgets/forms.html Just need some pointers. I tried playing around with htmlfill.render but it's not working for me. Thanks, Julian Sample code: ---- from tw.forms import TableForm, TextField from formencode.validators import Int, NotEmpty class BazForm(TableForm): show_errors = True fields = [ TextField('foo', validator=Int(), not_empty=True)] create_baz_form = BazForm("create_baz_form", action='savenew') ---- Controller: @expose('form.templates.new_form') def new(self, **kw): tmpl_context.form = create_baz_form return dict(modelname='Baz', page='New Baz') --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

