[html-formfu] DateTime Element and default values less than 10

Carl Franks fireartist at gmail.com
Mon Jun 1 11:20:19 GMT 2009


2009/6/1 Mike Glen <mike.glen at mindsweep.net>:
> I'm using DateTime elements on a form and if the default value passes to it
> using $form->model->default_values( ) has an hour or minute value of less
> than 10 it isn't selected in the form
> (it's ok if the default value in the yml is less than 10)

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?

Cheers,
Carl



More information about the HTML-FormFu mailing list