Working with 3 templates within a 2ph cakephp form

0

I'm trying to do this, as I work with 3 models inside a form, the form is referring to the main model and the other 2 models are associated with this model.

Example: <?php echo $this->Form->create('Escola', array('type' => 'file')); ?> <?php echo $this->Form->input('nome', array('class' => 'form-control')); ?> <?php echo $this->Form->input('descricao', array('class' => 'form-control')); ?> <?php echo $this->Form->input('EscolaTeste.nome', array('class' => 'form-control')); ?> <?php echo $this->Form->input('EscolaTeste.desc', array('class' => 'form-control')); ?> <?php echo $this->Form->input('EscolaNova.nome', array('class' => 'form-control')); ?> <?php echo $this->Form->input('EscolaNova.desc', array('class' => 'form-control')); ?> <?php echo $this->Form->end(); ?>

At the time of saving I use saveAll , remembering that Escola is the main template and EscolaTeste and EscolaNova are hasMany of Escola

    
asked by anonymous 06.01.2016 / 20:25

0 answers