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

Carl Franks fireartist at gmail.com
Tue Mar 25 13:45:06 GMT 2008


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



More information about the HTML-FormFu mailing list