marciocamello/yii2-mcms-maskmoney

Mask Money base in Jquery maskMoney

dev-master 2014-04-24 20:43 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:36:08 UTC


README

Mask Money base in Jquery maskMoney http://plentz.github.io/jquery-maskmoney/

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist marciocamello/yii2-mcms-maskmoney "*"

or add

"marciocamello/yii2-mcms-maskmoney": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?
	echo $form->field($model, 'price')->widget(\mcms\maskmoney\MaskMoney::className(),[
		 'htmlOptions' => [
			 'placeholder' => '0.00',
		 ]
	]);

	echo \mcms\maskmoney\MaskMoney::widget([
		'name' => 'price',
		'htmlOptions' => [
			'placeholder' => '0.00',
		]
	]);

?>