Phalcon Critaria:: formInput

i have the table itkparselle(iditk, idparc) related with two table Parcelle(idparc) and ITK( iditk , nom , date....) I want to fill the form of ITK from itkparselle but in ITKcontroller i msut make : $query = Criteria::fromInput($this->di, "Itk", $this->request->getpost()); and she dont accept
$query = Criteria::fromInput($this->di, "Itk_parcelle", $this->request->getpost() => erreur

how I can fill the ITK form from Itk_Parcelle.

thanks

Try using $_POST variable, also remove any variables in post that dont belong to the model in question.

$query = Criteria::fromInput($this->di, "Itkparcelle", $POST);



580

hy Rudi I tryed but i dont have a solution my table ITKParcelle(iditk, idparc) related with itk(iditk,name, details, value delai ) and Parcelle(idparc, nameparc.details) i want to fill the itk forms (name , details,delai ,value) from the model of itkparcelle in the ITKactionController $query = Criteria::fromInput($this->di, "Itkparcelle", $_POST); in the vieu : {% for ParcelleItk in page.items %} <td>{{ ParcelleItk.itk.getNomItk() }}</td> <td>{{ ParcelleItk.itk.getDateItk() }}</td> <td>{{ ParcelleItk.itk.getDureeHj() }}</td> <td>{{ "%.2f"|format( ParcelleItk.itk.getSurfItk()) }} m&sup2;</td> <td>{{ ParcelleItk.itk.getValeurItk() }}</td>

        the error is :   Notice: Undefined index: nom_itk in phalcon/mvc/model/criteria.zep on line 724 in C:\wamp\www\STC4\prod\app\controllers\ItkController.php on line 37

YOU cannot have KEYS in POST that do not match the model.