On Monday, February 25, 2013 6:14:43 AM UTC-5, kk.gnu wrote: > > Hello, thanks for the help. ... > > 3) you can also customize the generated forms via custom templates. > This is some thing I did not understand. Could you clearify? > > The base class that presumably all widgets share looks for an attribute named "template", in order to override a template just set that attribute to a new template So for the input field widget ...
https://github.com/toscawidgets/tw2.forms/blob/develop/tw2/forms/widgets.py#L31 class InputField(FormField): type = twc.Variable('Type of input field', default=twc.Required, attribute=True) value = twc.Param(attribute=True) template = "tw2.forms.templates.input_field" so just subclass it and override the template attribute all widgets also have a css_class attribute that can be set to whatever, and then you write your stylesheet accordingly. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
