PHP code example of evosoftcz / form-selectize

1. Go to this page and download the library: Download evosoftcz/form-selectize 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/ */

    

evosoftcz / form-selectize example snippets


$form->addSelectize('tags', 'štítky', $arrayData);

$form->addSelectize('tags', 'štítky', $arrayData, ['create' => false, 'maxItems' => 3]);

$form->addSelectize('tags', 'štítky', $arrayData)->setValueField('slug')->delimiter('_');

array (2)
	0 => array (2)
		id => 1
		name => "First item"
	1 => array (2)
		id => 2
		name => "Second item"

array (2)
    0 => array (3)
        'id' => 1
        'name' => "foo"
        'enabled' => true 
    1 => array (3)
        'id' => 2
        'name' => "bar"
        'enabled' => false