I am new to CakePHP. I have two problem with the view.
There is line break between text field name and text field area. I have tried to pass
'div' => falsebut that didn't work. How can I remove line break and display both on same line?I have added validation rule to this textfield but when I click save Error message doesn't show up. Do I need to do something else beside adding
validatesin my model?
Here is my view input.ctp
echo $this->Form->input('fileId', array(
'type'=>'text',
'style' => 'width: 200px; height: 15px'
));
echo $this->Form->end('Save Post');
Here is my model:
var $validate = array(
'fileId' => 'notEmpty',
'message' => 'Should not be empty'
);
Controller:
if ($this->request->is('post')) {
$data = $this->request->data;
if ($data) {
// saving the data
}
}