PHP code example of fsevestre / boolean-form-type

1. Go to this page and download the library: Download fsevestre/boolean-form-type library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fsevestre / boolean-form-type example snippets


$builder->add('enabled', BooleanType::class);

$builder
    ->add('enabled', BooleanType::class,
        array(
            'true_values' => array(1, '1', true, 'true', 'on', 'yes'),
            'false_values' => array(0, '0', false, 'false', 'off', 'no'),
        )
    )
;