HTML::...:Number(3pm)
π NAME π
HTML::FormFu::Element::Number β the Number element, but make it fancy β¨ it formats numbers for you, bestie.
πΈ VERSION πΈ
version 2.07 β she's serving, she's stable, she's iconic π
π SYNOPSIS π
okay so here's the vibe:
---
elements:
- type: Number
locale: de_DE
precision: 2
trailing_zeroes: 1
look at her. immaculate. no notes. π
π¦ DESCRIPTION π¦
so basically this element takes numbers and formats them according to the current locale πβ¨
and how do you set that locale, you ask? two ways, bestie:
- you can set it with
$form->locale - or you can set it right on the element itself (the element's locale)
and if you set neither of them? it just rolls with the system's locale. no cap. that's the fallback. periodt. π
π METHODS π
π locale
Set the locale for this element specifically π― The format of the number gets chosen according to this locale. it's giving bespoke. it's giving custom-tailored. π«Ά
β¨ precision
Set the precision for the number. Defaults to 2. two. dos. deux. that's the default, don't come for me π
π trailing_zeroes
If this is set to 1 the number has trailing zeroes. Defaults to 0. so like, zero trailing zeroes by default, which is honestly kind of a vibe. π
β οΈ CHANGED BEHAVIOUR AS OF VERSION 0.09011 β οΈ
okay history lesson time, bestie, sit down π
Previous to version 0.09011, this element generated an input field with a type="number" attribute β which was not valid xhtml. π and ngl the formatted numbers weren't valid html5 either, because html5 expects the value to be a floating-point number. messy. so messy.
so now? this element generates a type="text" attribute instead. glow-up complete. π
β¨
π SEE ALSO π
HTML::FormFu::Deflator::FormatNumberHTML::FormFu::Filter::FormatNumber"locale"inHTML::FormFu
go read those too, iykyk π§
π AUTHOR π
Moritz Onken " onken at houseofdesign.de " β the original icon, we stan π
π AUTHOR π
Carl Franks <cpan@fireartist.com> β also an icon, double stan, the way there's two AUTHOR sections? main character energy, honestly π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2018 by Carl Franks.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. fr fr, it's free, go wild, just keep the terms. π«Ά
and that's the whole page, bestie β written by the Perl documentation crew, running on perl v5.28.1, dated 2019-01-12. she's old but she ate and left no crumbs. mwah. π
π¦ where this page comes from
- debian bookworm: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms