Skip to content

Deprecated since 7.2

This page documents the classic module layer (CBController and cbInit()). It still works in every 7.x release, but new code should use resources and pages.

Use instead: TextInput::make('price')->numeric()->prefix('$').

Money Form Type ​

Input text with auto money number format

Code Sample ​

php
$this->form[] = ['label'=>'Price','name'=>'price','type'=>'money'];

Custom Money Format ​

php
$this->form[] = ['label'=>'Price','name'=>'price','type'=>'money', 'priceformat_parameters' => ['prefix' => 'Rp. ', 'thousandsSeparator' => '.', 'centsSeparator' => ',', 'centsLimit' => 2 ]];
// Rp. 1.000,00

Add priceformat_parameters attribute value with JQuery Price Format parameters

What's Next ​

Table Of Contents ​

Released under the MIT License.