library magento2-inputmask
Add inputMask parameter to abstract input. Based on IMask.
piszczek/magento2-inputmask
Add inputMask parameter to abstract input. Based on IMask.
- Monday, February 5, 2018
- by dzordz
- Repository
- 2 Watchers
- 4 Stars
- 430 Installations
- JavaScript
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 78 % Grown
This simply plugin allows add input mask configuration to form ui component configuration., (*1)
Based on Imask and support most of the configuration (except passing js function as a parameters)., (*2)
Installation
composer require piszczek/magento2-inputmask
Example
Location
app/code/Your/Module/view/adminhtml/ui_component/your_module_model_form.xml, (*3)
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
....
<fieldset name="General">
...
<field name="zip_code" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="inputMask" xsi:type="array">
<!-- pass your simple mask here-->
<item name="mask" xsi:type="string">00-000</item>
</item>
</item>
</argument>
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<label translate="true">Zip Code</label>
<placeholder>00-000</placeholder>
</settings>
</field>
...
</fieldset>
</form>
This plugin is lazy load - inputmask.min.js is only load when is required by one of fields in page., (*4)
dev-master
9999999-dev
Add inputMask parameter to abstract input. Based on IMask.
Sources
Download
proprietary
0.0.2
0.0.2.0
Add inputMask parameter to abstract input. Based on IMask.
Sources
Download
proprietary
0.0.1
0.0.1.0
Add inputMask parameter to abstract input. Based on IMask.
Sources
Download
proprietary