https://github.com/yiisoft/yii-masked-input
Yii Framework Masked input widget Extension
https://github.com/yiisoft/yii-masked-input
hacktoberfest maskedinput widget
Last synced: 8 months ago
JSON representation
Yii Framework Masked input widget Extension
- Host: GitHub
- URL: https://github.com/yiisoft/yii-masked-input
- Owner: yiisoft
- License: bsd-3-clause
- Archived: true
- Created: 2017-01-10T20:15:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T07:27:30.000Z (over 3 years ago)
- Last Synced: 2024-04-14T00:22:17.386Z (about 2 years ago)
- Topics: hacktoberfest, maskedinput, widget
- Language: PHP
- Homepage: https://www.yiiframework.com/
- Size: 82 KB
- Stars: 39
- Watchers: 27
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
This package is deprecated.
❌
---
Yii Framework Masked input widget Extension
This is the Masked Input extension for [Yii framework](http://www.yiiframework.com). It provides a masked input widget based on
[jQuery Input Mask plugin](http://robinherbots.github.io/Inputmask/).
For license information check the [LICENSE](LICENSE.md)-file.
[](https://packagist.org/packages/yiisoft/yii-masked-input)
[](https://packagist.org/packages/yiisoft/yii-masked-input)
[](https://travis-ci.com/yiisoft/yii-masked-input)
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
```
composer require --prefer-dist yiisoft/yii-masked-input
```
Usage
-----
To use MaskedInput, you must set the [[mask]] property. The following example
shows how to use MaskedInput to collect phone numbers:
```php
echo MaskedInput::widget([
'name' => 'phone',
'mask' => '999-999-9999',
]);
```
You can also use this widget in an [[ActiveForm]] using the [[ActiveField::widget()|widget()]]
method, for example like this:
```php
= $form
->field($model, 'from_date')
->widget(Yiisoft\Yii\MaskedInput\MaskedInput::class, [
'mask' => '999-999-9999',
]) ?>
```