[html-formfu] FormFu::Model subclassing

Carl Franks fireartist at gmail.com
Fri Aug 14 07:38:59 GMT 2009


Hi Nick,

First place to start should be the docs for HTML::FormFu.
http://search.cpan.org/~cfranks/HTML-FormFu-0.05001/lib/HTML/FormFu.pm#SUBMITTED_FORM_VALUES_AND_ERRORS
That explains how to get submitted data.
$field->default() is only for setting a value before displaying the form.

What are you wanting your model to do / to interface with?
When you say the HashRef update() didn't work at all, what were you
expecting it to do? And what did it actually do, if anything?
HashRef's update() is just an alias to create(), and the tests in
t/model/hashref_create.t show that it does do what the author expects
it to do - which is to simply return a hash-ref of values.

Carl

2009/8/13 Nick Spacek <nick.spacek at gmail.com>:
> Hi there,
> I've been looking at the HashRef and DBIC models to see if I can put
> together my own. I've been having problems with the update side of things.
> Trying to retrieve the value from my elements using $element->default
> doesn't work (it doesn't return anything). I only realized now however that
> the DBIC update is pulling the values from $form->param_value, which does
> appear to return values.
> For the last little while I've been going nuts trying to figure out why the
> parameter values are there in _processed_values and other places but I
> couldn't get anything back. I tried putting together a simple test using the
> HashRef model and it doesn't appear to work at all (updating that is). Am I
> the only one who noticed? :) Is there something special you have to do to
> have Model::HashRef work?
> Thanks.
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>



More information about the HTML-FormFu mailing list