[Catalyst] Changing format of date field

Bill Moseley moseley at hank.org
Thu Jan 9 22:42:00 GMT 2014

On Tue, Jan 7, 2014 at 1:41 AM, Adam Witney <awitney at sgul.ac.uk> wrote:

> [% user_time( foo.event_start, '_DT_TIMESTAMP_WITH_ZONE' ) | html %]
> Hi Bill,
> Thanks for your email. I agree that the template seems like a good place
> for this, but to give a little extra detail.
> I have a form that is used for both object create and editing. When I edit
> an object I have this in my controller:
> $c->stash(formdata =3D> $object);
> and in the template:
> <input name=3D"datefield" type=3D"text" value=3D"[% formdata.datefield.dm=
> %]" />
> But when creating a new object, if the form validation fails I pass the
> form data back to the form like so:
> $c->stash( formdata =3D> $c->request->params );

Have you looked at HTML::FormHandler?   I would assume it addresses this.
I use something similar and the concept is that you have a field object
that knows how to render either from the existing object or from user
provided input.

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20140109/bd6c9=

More information about the Catalyst mailing list