owl/money 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

owl/money

Composer 安装命令:

composer require owl/money

包简介

Tag form widget for OctoberCMS.

README 文档

README

Money form widget for OctoberCMS.

Packagist

Installation

To install the Money widget with your plugin, add the following to your plugin's composer.json file.

"require": {
    "owl/money": "~1.0@dev"
}

Next, register the widget in your plugin's Plugin.php file.

public function registerFormWidgets()
{
    return [
        'Owl\FormWidgets\Money\Widget' => [
            'label' => 'Money',
            'code' => 'owl-money'
        ],
    ];
}

Usage

To use the Money widget, simply declare a field type as owl-money

price:
    label: Price
    type: owl-money

There are several parameters that can be used to customize the money widget. Defining a thousands or decimal will change the thousands and decimal characters. Defining a prefix or suffix string will allow you to add currency symbols before or after the input. Lastly, setting allowNegative to true will allow negative values to be submitted.

The below example will accept negative inputs with a USD prefix ($ -1,234.56)

price:
    label: Price
    type: owl-money
    prefix: "$ "
    allowNegative: true

You may need to define the widget configuration dynamically. For example, your plugin might have a variable currency symbol. This can be achieved like so...

Config::set('owl.formwidgets::money', [
    'prefix'        => '$ ',
    'placeholder'   => '$ 0.00',
]);

统计信息

  • 总下载量: 449
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固