sem-soft/yii2-widgets

Set of additional basic widgets for Yii2 Framework

Installs: 2 008

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-widgets

1.0.3 2018-02-12 15:59 UTC

This package is auto-updated.

Last update: 2024-11-07 07:52:20 UTC


README

Install by composer

composer require sem-soft/yii2-widgets

Or add this code into require section of your composer.json and then call composer update in console

"sem-soft/yii2-widgets": "*"

Usage without Model

<?= sem\widgets\TransliterationInput::widget([
  'name'      =>  'in',
  'targetId'  =>  'test',
]);?>
<?= \yii\helpers\Html::textInput('out', null, [
  'id'    =>	'test'
]);?>

Usage with ActiveForm notation

 <?= $form->field($model, 'name')->widget(sem\widgets\TransliterationInput::className(), [
   'maxlength' =>  true,
   'targetId'  =>  'company-code'
 ]);?>
 <?= $form->field($model, 'code')->widget(MaskedInput::className(), [
   'id'          =>  'company-code',
   'mask'        =>  '*{2,64}',
   'definitions' =>  [
     '*' =>  [
       'validator'   =>  '[a-z0-9-]',
       'cardinality  =>  1,
       'casing'      =>  'lower'
   ]
 ],
 'clientOptions'	=>	[
   'autoUnmask'=>true
 ]
]);?>