[html-formfu] Repeatable elements, number of empty rows on a "create" form.

Brian Cassidy brian.cassidy at gmail.com
Tue Mar 2 11:30:29 GMT 2010


On Tue, Mar 2, 2010 at 5:09 AM, Carl Franks <fireartist at gmail.com> wrote:
> If you're calling $form->model->default_values()
> it should automatically expand the repeatable block.
>
> If you're not, you'll need to do something like:
>
> if ( ! $form->submitted ) {
>    $form->get_all_element({ type => 'Repeatable' })->repeat(3);
>    $form->get_all_element('count')->default(3);
>    $form->process;
> }

Not sure how I missed that before. *sigh*

Thanks Carl,

-- 
Brian Cassidy (brian.cassidy at gmail.com)



More information about the HTML-FormFu mailing list