Blueprint & ORM, ignores some of the formo() method in model
Closed this issue · 0 comments
momoteRyanmt commented
Seems to be specifically setting the label
In the action I have
$item = ORM::factory('jobitem');
$items_form = Formo::form(['alias' => 'jobitems', 'blueprint' => true])
->orm('load', ['model'=> $item])
->pad_blueprint(2);
In the job item model i have
public function formo($form, $opts){
$form->id->set(['render'=> false]);
$form->item_id->set(['render'=> false]);
$form->job_id->set(['render'=> false]);
$form->notes->set(['render'=> false]);
$form->type->set(['label' => 'Label for type']);
}
render=> false is acknowledged and the field is removed.
For 'type' trying to set the label does nothing - the label remains as the default ('type')