[html-formfu] default_values() to be called after process() ?

Carl Franks fireartist at gmail.com
Mon Aug 25 09:18:23 BST 2008


2008/8/20 Michele Beltrame <mb at cattlegrid.info>:
> Hello!
>
> I read in the HTML::FormFu documentation that $form->default_values()
> should be called after $form->process(). By chance I tried the opposite,
> and it still works.
>
> Are there caveats or particular reasons for calling process() after
> default_values() ?

Maybe you got lucky :)
It definitely won't work with Date fields and Repeatable blocks.
It also won't work for any fields that use force_default()
So it's just a lot easier for me to say "always do process() last",
rather than list the caveats.

Carl



More information about the HTML-FormFu mailing list