I am creating my form in the layout of my application and the view just have inputs.
// In layout
$this->Form->create('modelname');
// In view
$this->Form->input('fieldname');
Is there a way I can set default Model in my view just like inputDefaults
$this->Form->inputDefaults(array(
'label' => false,
'div' => false,
'class' => 'fancy'
)
);
Cake Validation only works if it found input using [modelname][fieldname], so I can write in the view
$this->Form->input('modelname.fieldname');
but I have to change all of my forms.
Is there any way I can set model name in the view??