$DefaultValues = array('Field1' => 'Value1', 'Field2' => 'Value2'); $fieldset = Fieldset::forge('FieldsetName') ->add_model('MyModel', $DefaultValues); $form = $fieldset->form();
<?php echo $Form->build(); ?>
$fieldset->populate($DefaultValues);
JasonJudge wrote on Monday 28th of May 2012:Edit: this is what I used to generate the initial model: https://github.com/SicoAnimal/fuel-model-generator The model it generates is quite verbose, but it is a great starting point to work from.
Harro Verton wrote on Monday 28th of May 2012:add_model() doesn't accept an array of default values, I don't know where you got it from.
It looks like you're new here. If you want to get involved, click one of these buttons!