<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
2amigos / yii2-bootstrap-form-helpers-library example snippets
// using Select Widget, the custom select HTML element of the library
dosamigos\formhelpers\Select::widget([
'model' => $model,
'attribute' => 'attributeName',
'items' => [
'1' => 'One option',
'2' => 'Another option'
],
// for all possible client options, please see
// http://bootstrapformhelpers.com/select/#jquery-plugins
'clientOptions' => [
'filter' => 'true' // boolean must be as a string
]
]);
// using the NumberInput
dosamigos\formhelpers\NumberInput::widget([
'model' => $model,
'attribute' => 'updated_at',
// not ,
'language' => 'es_ES',
'clientOptions' => [
'format' => 'm/d/y',
]
]);
// using the CurrencyPicker with flags
dosamigos\formhelpers\CurrencyPicker::widget([
'model' => $model,
'attribute' => 'updated_at',
// important! if we don't use the custom select HTML we won't see the flags
'selectBox' => true,
'clientOptions' => [
'flags' => 'true',
]
])
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.