此 currency 表单微件渲染一个用于输入数字货币值的字段。此字段使用主货币定义或 基础货币 设置 选自 站点定义 区域。
此字段在安装 货币插件 后引入,该插件可在 October CMS 应用商店获取。您可以使用以下命令安装它。
php artisan plugin:install Responsiv.Currency:::
要显示货币输入,像这样定义一个表单字段:
total_amount:
label: Total amount
type: currency| Property | Description |
|---|---|
| format | an optional format when previewing the form field, either: long, short or null. Default: null. |
使用 format 属性可在预览上下文中显示表单字段时更改格式。
total_amount:
label: Total amount
type: currency
format: short