[Catalyst] "update_from_form" and empty fields
Ken Youens-Clark
kyclark at gmail.com
Fri Nov 18 21:10:34 CET 2005
On Nov 18, 2005, at 1:35 PM, Andy Grundman wrote:
>>>> I'm using "$class->update_from_form( $c->form )" to pass through
>>>> my form submission to my Class::DBI model. This works great
>>>> except when I'm trying to put an empty string in place of some
>>>> value that was there before (that is, I want to get rid of a
>>>> field's value). Any suggestions or workarounds?
>>>
>>> You probably need to
>> ...ignore me and listen to andyg.
>
> Actually you're probably right. FromForm 0.03 has been out for a
> while so while it could really be either problem, not having
> missing_optional_valid is more likely. :)
My version of Class::DBI::FromForm is 0.03, so it looks like I do
need to set the "missing_optional_valid => 1" for OK, so ... how do
I do that? I tried this:
$c->stash->{'item'}->update_from_form($c->form
(missing_optional_valid => 1));
But that doesn't seem to work.
Feel free to point me to the Fine Manual.
ky
More information about the Catalyst
mailing list