⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Checkbox in add edit form



php_lover
  • profile picture
  • Member

Posted 23 February 2013 - 05:35 AM

Hi all how can i use checkbox in grocery crud in add and edit form as well as i select values form groceryy crud in the form of yes or no


php_lover
  • profile picture
  • Member

Posted 23 February 2013 - 06:32 AM

Anyone  Helllllllllllllllllllllllllllllllllllllllllllllllp


Kaabi
  • profile picture
  • Member

Posted 05 July 2013 - 13:29 PM

I know this old post but just for the reference you can check

 

http://www.grocerycrud.com/documentation/options_functions/field_type

 

or if you got boolean true false you can use

$crud->field_type('my_field','true_false');

Suresh Bhatol
  • profile picture
  • Member

Posted 24 July 2013 - 12:47 PM

$crud->callback_add_field('field_name',array($this,'add_field_callback_1'));
$crud->callback_edit_field('field_name',array($this,'add_field_callback_1'));
       

function add_field_callback_1()
    {
        return ' <input type="radio" name="sex" value="will" /> will
                 <input type="radio" name="sex" value="will not" /> will not';
    }

 

Use this working..........