public function set_form_fields($fieldset, $instance = null) { $fieldset->add('name', 'Name')->set_type('text')->add_rule('required'); // etc... for all the other fields // optionally pass an array or model instance as the second param to use for initial values: $fieldset->add('email', 'Email')->set_type('text')->set_value($instance->email); }
It looks like you're new here. If you want to get involved, click one of these buttons!