定制 adt/nette-forms-currency 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

adt/nette-forms-currency

最新稳定版本:v1.4.2

Composer 安装命令:

composer require adt/nette-forms-currency

包简介

无描述信息

README 文档

README

Nette component for creating currency input.

Installation

Install currency input library via composer:

composer require adt/nette-forms-currency

and register method extension in bootstrap.php:

\ADT\Forms\Controls\CurrencyInput::register();

This allows you to call the method addCurrency on class Nette\Forms\Form or Nette\Forms\Container.

For live formatting functionality its necessary to create custom js.
You can use our example bellow. Install and link following libraries:
nette.ajax.js
autoNumeric

Initialize autoNumeric on currency input

$(function () { $.nette.ext('live').after(function ($element) { $element.find('.js-nette-forms-currency').each(function () { new AutoNumeric(this, JSON.parse(this.dataset.options)); }); }); })

Usage

It's very simple:

$form->addCurrency('currency', 'label', \ADT\Forms\Controls\CurrencyInput::CURRENCY_CZK); $form->onSuccess[] = function ($form) { $form['currency']->getValue(); // returns eg. from "100 000 000,56 kč" => "100000000.56"  };

And in latte:

{input currency}

To turn on autocomplete in IDE, add @method CurrencyInput addCurrency($name, $label = null, $currency = null, $language = null) to your base form.

统计信息

  • 总下载量: 9.65k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 13
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固