On 18 October 2011 11:46, abhishek jain <abhishek.netj...@gmail.com> wrote: > > > On Tue, Oct 18, 2011 at 4:10 PM, Carl Franks <fireart...@gmail.com> wrote: >> >> On 18 October 2011 11:30, abhishek jain <abhishek.netj...@gmail.com> >> wrote: >> > How to prefill form from session, iam doing multi step form and i need a >> > way >> > to persist values via session till last step. >> > Also how to prefill from database, >> >> For integration with DBIx::Class, see HTML::FormFu::Model::DBIC > > Can i use formfu to prefill fields by field, i mean from a variable, as i > dont want to write a plugin now and dont want to use hidden form field,
Hi, To set the default value on a single field, use $field->default( $value ); To do the same for multiple fields, do $form->default_values({ field1 => $value1, field2 => $value2, }); For a more complicated set (read: nested blocks/fields), see HTML::FormFu::Model::HashRef. If you use any of these, you must then always call $form->process() before displaying the form to the user. Cheers, Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu