Take the 2-minute tour ×

I have a problem with the Form Helper that returned $this->data keeps being empty. In my Forms before there was no problems and I cant figure out what's different here. For this Form there's not a model containing the data, its just user input for doing a search.

This is my View:

echo $this->Form->create();
echo $this->Form->input('Postleitzahl');
echo $this->Form->input('Entfernung',array('type'=> 'select' , 'options'=>array(($options))));
echo $this->Form->end('Suchen');
share|improve this question
also do a debug($this->data) to be certain in your action –  Ross Dec 3 '11 at 17:30
Maybe you could use it directly from $this->params? –  Henri Dec 3 '11 at 17:37

3 Answers 3

Just don't double array your array:

share|improve this answer
changed that ...but still the same..problem , maybe it is because it doesnt represent a model in the database and i have to declare the input variables somehow ? –  Tolga Dec 3 '11 at 17:29
there should always be some model. either use a "fake" model name like "Form" in order to use the posted data in the controller - or even better use a real model with $useTable=false (this way you can have validation on your forms without using any real tables). –  mark Dec 3 '11 at 18:26

    echo $this->Form->create(null, array('type' => 'post')); # not sure if that's needed
    echo $this->Form->input('Search.Postleitzahl');
    echo $this->Form->input('Search.Entfernung',array('options'=> $options)); # seems shorter and should work


The above should result into a $this->data array containing something similar to this:

    ['Postleitzahl']: 102929
    ['Enfernung']: 'foobar'
share|improve this answer

Not necessarily related to Cake, but the answer to the problem when I had it: if you're including a file upload in your POST, double-check that the file you're uploading isn't larger than the limit specified in your php.ini file.

share|improve this answer

Your Answer


