This repository has been archived by the owner on Dec 29, 2021. It is now read-only.
generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Form MoneyField
Luca Longo edited this page Aug 26, 2020
·
3 revisions
Render an input field that allow money values, with currency supports.
Inherits all properties from NumberField
, but adds new ones.
name | type | default value | description |
---|---|---|---|
id | ?string | null | Field ID (autogenerated if empty) |
name | ?string | null | Field name |
label | ?string | null | Label visible on the form |
errorBag | ?string | null | Error field returned from the bag |
disabled | bool | false | Determs if the field is disable (or not) |
readOnly | bool | false | Determs if the field is read-only (or not) |
value | mixed | null | Field value |
placeholder | ?string | null | Field placeholder |
scale | int | 2 | Decimal places |
currency | ?string | null | Currency |
<x-bc-form:money-field label="Money field" error-bag="numberField" :scale="2" currency="€" />
or, if you use Laravel Livewire:
<x-bc-form:money-field label="Money field" error-bag="moneyField" wire:model.lazy="moneyField" :scale="2" currency="$" />
prepend
append
Example:
<x-bc-form:money-field>
<x-slot name="prepend">Prepend</x-slot>
<x-slot name="append">Append</x-slot>
</x-bc-form:money-field>