[Catalyst] html::widget

Will Smith willbelair at yahoo.com
Wed Dec 6 20:52:35 GMT 2006

 It's pretty neat to use html::widget to create/validate html form. Problem is I need to create a lot of customized  html forms that could not done easily with html::widget. I want to simply do my own html form and use a normal action to update the record.
 I tried to use somehing like:
 my $book = $c->model('myapp::Book')->update({
                 title   => $title,
                 rating  => $rating,
 but of course, it updates the whole table, not only the wanted record, because I do not put in the condition "where".
 I used to use : update_from_form in older version of catalyst.
 Could someone please show me the syntax to do the update, either adding condition to the above method (which I think there is a simple way), or using update_from_form
 something like the old timer:
 $c->for( optional => [ myapp::M::CDBI::books->columns ] );
 myapp::M::CDBI::books->retrieve($id)->update_from_form( $c->form);
 Thank you
Want to start your own business? Learn how on Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061206/f3e24353/attachment.htm

More information about the Catalyst mailing list