On 13/08/07, Tobias Kremer <[EMAIL PROTECTED]> wrote:
> Carl,
>
> is it correct, that it's currently completely impossible to set a value for 
> the
> newly introduced date element? I tried the following variations and none of 
> them
> seems to work:
>
> 1. $form->get_field( { name => 'birthdate' } )->value( '1977-07-07' );
> 2. $form->get_field( { name => 'birthdate' } )->value( DateTime->now() );
> 3. $form->get_field( { name => 'birthdate.year' } )->value( '1977' );

At the moment, the only way is to use the month_default(), etc. methods.
Never try to change the sub-selects by retrieving them from the form -
because they are deleted and rebuilt for every $form->process() and
$form->render() - losing your changes.

I plan on making a more consistent way to make changes soon.

Carl

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to