CakePHP - radio button not showing error message

Posted by teepusink on Stack Overflow See other posts from Stack Overflow or by teepusink
Published on 2010-05-04T20:06:58Z Indexed on 2010/05/04 20:18 UTC
Read the original article Hit count: 258

Filed under:

Hi,

I'm unable to get the error message to show up when creating a radio form using the CakePHP form helper.

This is what I have now.

     $options=array('active'=>'Active','inactive'=>'Inactive');
     echo $form->input('Status', array(
  'type' => 'radio',
  'id' => 'EntryStatus',
  'name' => 'data[Entry][status]',
  'options' => $options

));

What am I missing?
I'm using CakePHP 1.2.7 and this is what I have in the validation
'status' => array( 'notempty' => array( 'rule' => 'notempty', 'required' => true, 'message' => 'yo' ) )

Tried the answer from http://stackoverflow.com/questions/1388823/form-helper-for-creating-radio-button-in-cakephp and it's giving me a select option form instead.

Thanks,
Tee

© Stack Overflow or respective owner

Related posts about cakephp