Blog

 

CakePHP radio button example

 

Cake 1.1

   
    echo $html->radio(  
        User/admin',  
        array(  
            'no' => 'No',  
            'yes' => 'Yes'),  
            null,  
           array('value' => 'no')  
       );
 

Cake 1.2

     echo $form->input('User.admin', array(
     'div' => false,
     'label' => true,
     'type' => 'radio',
     'options' => array(1 => 'Yes', 2 => 'N')
);

Classic html way:

<input type="radio" value="data[User][admin]" name="group1" /> Milk

 


Comments

Comment add by: 1   2009-01-02

tekst

Comment add by: 1   2009-01-02

teste



Add comment

Are you human?
Enter code string first,
than press Add Comments



AUTORIZED RETAILER
timkom autorized retails
2co
2Checkout is the authorized retailer of goods and services provided by Timkom
AUTORIZED RESELLER
Download software
usergate and firewall
NEW ON THE SITE
timkom services