2009/6/1 Mike Glen <mike.g...@mindsweep.net>: > Carl Franks wrote: >> >> This will be related to 0-padded numbers (01, 02, etc) >> but it should be handled correctly already. >> >> Can you check that you're calling $form->process() after >> $form->model->default_values() and before rendering the form? >> > Thanks, that fixes it. > I'm using catalyst and thought that $form->process() was called > automatically by the controller.
It is, but I usually advise calling process() after $form->model->default_values(), primarily because of the way Date(Time) fields are built. There are many methods documented, for which you need to call process() again, including $form->default_values(). $field->default() (which $form->model->default_values() calls) isn't documented as such, but maybe should be. I can't remember if there was a consensus on whether it should be necessary to call process(), or whether to keep fixing any side-effects such as this, that come up. Anyway, I've made a fix for this particular problem, in svn revision 1526. It'll be in the next cpan release. Cheers, Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu