[html-formfu] HTML::FormFu::Inflator::Imager, more complete example

Carl Franks fireartist at gmail.com
Fri Mar 7 14:15:33 GMT 2008


On 07/03/2008, Alex Povolotsky <tarkhil at over.ru> wrote:
> Hello!
>
>  HTML::FormFu documentation is (again) quite unclear on usage of inflators.
>
>  Using
>
>  ---
>  elements:
>   - type: File
>     name: photo
>     attributes:
>       accept: image/jpg
>     inflators:
>       - type: Imager
>
>  how do I access Imager object from $form?

What have you tried?

Inflators just change the value, so either
    $form->param_value($name)
or
    $form->params->{$name}
will work.

> FORM LOGIC AND VALIDATION
>
> Inflators are intended to allow a value to be turned into an appropriate
> object. The resulting object will be passed to subsequent Validators
> and Transformers, and will also be returned by "params" and "param".

(I see I need to change the docs there to use param_value rather than param)

Carl



More information about the HTML-FormFu mailing list