data['Article[title]'] ); ?> If I change the name of the input for ex Articletitle (without square brackets) a code like this works fine: $form->data['Articletitle'] ); ?> Thanks"> Edit Form $form->data['Model ID'] don't work - Forums

Forums

Edit Form $form->data['Model ID'] don't work

fasenderos 14 Feb, 2015
Answer
Hi,
I have followed this article to create an edit form to be called by an Edit link in a ChronoConnectivity listing.
Everything works fine, data are loaded correctly from database but according to the article linked above "All of the input names should be array names using the Model ID, e.g. Article[title]".
The problem is that in the "DB Read Conditions", this code don't work:

<?php
  return array( 'parent' => $form->data['Article[title]'] );
  ?> 


If I change the name of the input for ex
Articletitle
(without square brackets) a code like this works fine:

<?php
  return array( 'parent' => $form->data['Articletitle'] );
  ?> 


Thanks
fasenderos 14 Feb, 2015
Solved with

<?php
  return array( 'parent' => $form->data['Article']['title'] );
  ?> 
This topic is locked and no more replies can be posted.