I am trying to save data with the following structure: 
As you can see, there is a HABTM association between users and the experience table. And another HABTM between event_users and tags. I created the following form:
<?php echo $form->create('Experience', array('action' => 'addClassic'));?> <?php echo $form->input('Experience.date', array('dateFormat' => 'DMY')); echo $form->input('Experience.time', array('timeFormat' => '24', 'empty' => array(-1 => '---'), 'default' => '-1')); echo $form->input('Experience.name'); echo $form->input('ExperiencesUser.1.note'); echo $form->input('ExperiencesUser.1.rating'); //echo $form->input('Tags.Tags', array('multiple' => 'multiple', 'options' => $tags)); //echo $form->input('ExperiencesUser.1.Tags', array('multiple' => 'multiple', 'options' => $tags)); //echo $form->input('ExperiencesUser.1.Tags.Tags', array('multiple' => 'multiple', 'options' => $tags)); echo $form->input('ExperiencesUser.1.confirmed', array('type' => 'hidden', 'value' => '1')); echo $form->input('ExperiencesUser.1.user_id', array('type' => 'hidden')); echo $form->input('ExperiencesUser.2.user_id', array('type' => 'hidden')); ?> <?php echo $form->end(__('Add', true));?>
And everything works well. The saveAll method creates a new experience, passes this new experience to two users (through experienced users), and sets the material around.
My concern is that I want to assign some tags to the newly created experience_users entry (to the first). I thought this should be done through some of the comments. Each line of this commented code creates a form and sends the data to $ this-> data, but is never saved.
So my question is: what is the correct input syntax $ this-> data or $ form-> in my example to save data in experience_users_tags?
picca source share