2008/5/23 Michele Beltrame <[EMAIL PROTECTED]>:
> Hello!
>
> I found myself doing transformations (via callbacks) on a field
> depending on other fields of a form. Such as:
>
>  transformers => [{
>      type     => 'Callback',
>      callback => sub {
>          my ($v, $p) = @_;
>          return $p->{birth_defects} == 1 ? $v : 'other';
>      },
>  }],
>
> I discovered that, unlike in Constrains, the other form fields are
> not passed to Transformers as a second parameter.
>
> Here's a patch to achieve this. If (Carl) you think it's OK, I can
> commit it myself along with a test and documentation changes.

Sorry it's taken to long so pick this up.
Yes - this looks good, particularly as Transformer::process() is
already being passed $params.
If you could add a quick test and commit it, that'd be great.

Thanks,
Carl

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

Reply via email to