Hi, first of all sorry if this question has already been done, but i
haven't found the answer..
I've understood how it's possible to create a web form using widgets..
for example:
in controller:
example_form = widgets.TableForm(
fields=[widgets.TextField(name="test",label="Example"),
widgets.TextField(name="test2",label="Example2"),for_widget,name1
],
submit_text="Submit Me")
in template:
${example_form(action="prova")}
but it isn't so clear the way i've to follow to insert only a widgets,
without a form.
If i write:
in controller:
name1 = widgets.TextField("boh",validator=validators.NotEmpty())
and in template:
${name1}
looking at the web page, the result is:
TextField(name='boh', convert=True, field_class='textfield', attrs={},
css_classes=[]).
Instead, if i write in template:
${name1.render()}
the HTML result is:
<INPUT ID="boh" TYPE="text" CLASS="textfield requiredfield"
NAME="boh">
that isn't correct because it is escaped (in particular the first
character).
Could anyone suggest me the correct way i've to follow to use correctly
the TG widgets?
Thanks,
Renzo (Italy)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---