[html-formfu] Modify a submitted value before storing it in the database

Octavian Rasnita orasnita at gmail.com
Wed Oct 8 18:02:37 BST 2008


Hi,

I want to add a new user from a FormFu form, using:

my $new_user = $c->model("DB::TempUser")->new_result({hash => $hash});

$form->save_to_model($new_user);

But before adding the elements of the form in the database, I want to 
sha1_hex() the submitted password, which is one of the form fields.

Please tell me what's the recommended way for doing this (and if the 2 lines 
above I use are the recommended way of inserting a new row in DB.)

Thank you.

Octavian




More information about the HTML-FormFu mailing list