Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Checkboxes and ORM
  • Hello, New to FuelPHP, but think it's great. Sorry if this question has been asked a million times before, but I couldn't find it anywhere. I've got an ORM model setup and one of the $_properties is set to form type "checkbox". When I use the fieldset forge method to auto-generate the table the checkbox is always unchecked, even when the value in the MySQL (which is of the type int(1)) is set to 1. How can I make it so that the checkbox will be checked if the value in MySQL is 1 and not checked if it's 0. Thanks.
  • protected static $_properties = array(
        'accept' => array(
            'form' => array(
                'type' => 'checkbox',
                'options' => array(1 => 'accept')
            ),
        ),
    );
    

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion