rendering improvements

0 views
Skip to first unread message

Gerda Shank

unread,
Nov 20, 2011, 12:41:53 PM11/20/11
to formh...@googlegroups.com
I have a new job which uses a lot of TT templates, so I'm updating the
existing FormHandler templates and related rendering.

While I'm in that area, does anybody have any features requests or
suggestions for rendering improvements? Or other improvements, for that
matter.

Gerda

Matthias Dietrich

unread,
Nov 20, 2011, 1:26:50 PM11/20/11
to formh...@googlegroups.com
Am 20.11.2011 um 18:41 schrieb Gerda Shank:

> I have a new job which uses a lot of TT templates, so I'm updating the existing FormHandler templates and related rendering.
>
> While I'm in that area, does anybody have any features requests or suggestions for rendering improvements? Or other improvements, for that matter.

I'd like to have HTML5 placeholders which are localized :-). Is this something you've meant?

Matthias

Gerda Shank

unread,
Nov 20, 2011, 8:26:41 PM11/20/11
to formh...@googlegroups.com
Matthias:

You can add a 'placeholder' attribute with: html_attr => { placeholder
=> '....' }. Getting it localized is a bit trickier. How are you
rendering? If you're using the widgets, you could to do something with
_add_html_attributes (in
HTML::FormHandler::Widget::Field::Role::HTMLAttributes). A 'before'
method modifier in a role added to the field class, maybe, which sets
the 'placeholder' attribute and localized it.

Gerda

Reply all
Reply to author
Forward
0 new messages