On Mon, Aug 27, 2012 at 6:56 AM, Anil <[email protected]> wrote:
> I am using the class FormRenderer() and calling it's
>
> renderer = FormRenderer(form)
>
> ${renderer.password("password", size=25, class="input")}
>
> When I try to add that class kw option, I get an exception:
>
> SyntaxException: (SyntaxError) invalid syntax (<unknown>, line 1)
> (u'renderer.password("password", size=25, class="inpu')
>
> I remember coming across this in the past when using formencode (which this
> is based on), but don't remember the fix. How would I apply a class field to
> the html form using the syntax above?

I think you just need to add an underscore (class is a reserved keyword):

${renderer.password("password", size=25, class_="input")}

-- 
Ronan Amicel

«« Twitter overload?
»» Get your daily summary at http://focus.io/

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to