[html-formfu] non-processing actions, WAS: Date element stopped working

vti viacheslav.t at gmail.com
Tue Mar 25 15:14:50 GMT 2008


Carl Franks(fireartist at gmail.com)@Tue, Mar 25, 2008 at 01:45:06PM +0000:
> On 25/03/2008, vti <viacheslav.t at gmail.com> wrote:
> >
> > I created sample Cat app and behaves the same as my app. Sorry for the name, but
> >  it is what I fill now :)
> 
> ah, the problem is that you're setting the default() after the
> FormConfig action calls $form->process.
> 
> If you make any changes to the form, you need to add a
> $form->process() before returning from the action subroutine.
> 
> What would be ideal - and I think has been discussed before - would be
> a FormConfig action that doesn't automatically call process() - as it
> can be an expensive and possibly destructive method to call twice.
> 
> I think I was initially worried about an explosion of action names, as
> we already have:
>     Form
>     FormConfig
>     FormMethod
>     MultiForm
>     MultiFormConfig
>     MultiFormMethod
> 
> Adding non-processing actions would immediately double that number.
> 
> Maybe something like
>     FormConfig('process=0')
>     FormConfig('config-file', 'process=0')
> would be better than adding new action names.
> 
> It might get hairy handling all possibilities though, as the
> attributes don't really support multiple arguments, so we'd have to
> parse the strings ourselves.
> fex, with the above example we'd actually get something like:
>     $VAR1 = "config-file\', \'process=0"
> 
> Carl
 
But why Text field changes and Date does not? Almost in every controller I do
have FormConfig attr on a sub method and inside I do
$form->model('DBIC')->default_values( $dbic_object ) and it seems like
working... If I correctly understood you - this shouldn't work either..

Appreciate your time and help. Thanks a lot.

-- 
vti -- Viacheslav Tikhanovskii



More information about the HTML-FormFu mailing list