[Catalyst] "update_from_form" and empty fields

Jesse Sheidlower jester at panix.com
Fri Nov 18 20:12:25 CET 2005


On Fri, Nov 18, 2005 at 12:44:04PM -0600, Ken Youens-Clark wrote:
> Hi,
> 
> 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 put 

  missing_optional_valid => 1

into your Data::FormValidator profile. This ensures that empty
form fields are sent to the database as undefs.

Jesse Sheidlower



More information about the Catalyst mailing list