Form::...uration(3pm)

πŸ“¦
version 2.5.0 Β· 2 versions
, in ubuntu jammy

πŸ’– NAME πŸ’–

Embperl::Form::Control::price β€” bestie, it's a price input control, and it can even carry a lil unit inside an Embperl Form πŸŽ€

So this page lives in the User Contributed Perl Documentation, and the manual it belongs to is Form::...uration(3pm) (yes the title got cutely truncated, we don't ask questions πŸ’…). It's perl v5.34.0, stamped 2022-02-06, and we'll wave at it again at the end 🫢


✨ SYNOPSIS ✨

  {
  type => 'price',
  text => 'blabla',
  name => 'foo',
  unit => 'sec',
  }

Look at her. Four little keys and she's ready to serve πŸ’…


🌸 DESCRIPTION 🌸

Okay so lowkey this is the thing you drop into an Embperl Form when you want a price input control. It takes a number and formats it as a money amount β€” like, actual currency vibes, not just a sad raw number 😭✨

And as a lil bonus, if you want, it can show a unit right after the input field. Obsessed.

Heads up bestie: this page doesn't teach you the parameters β€” for that you gotta go read Embperl::Form on how to specify parameters. She's the main character, this page is just the side quest 🧚

πŸŽ€ PARAMETER πŸŽ€

  • type β€” this one needs to be 'price'. Like, non-negotiable. It's giving "the whole point" πŸ‘‘
  • name β€” the name of the control. Name her something cute, she deserves it 🫢
  • text β€” this becomes the label for the numeric input control. Yes, the little text that sits there being informative ✨
  • size β€” the size, in characters. (Default: 10) πŸ“
  • maxlength β€” the maximum length, in characters. (Original says "maximun", we still love her, the meaning is maximum πŸ’€)
  • unit β€” a string that gets displayed to the right of the input field. (Default: empty string) β€” so by default there's literally nothing there, no unit, no nothing, just vibes 🌈
  • use_comma β€” if you set this, the decimal character is a comma instead of a point. (Default: on) β€” so yeah, comma is the default behaviour fr fr πŸ“

πŸ‘‘ Author πŸ‘‘

G. Richter (richter at embperl dot org) β€” thank you for your service, icon πŸ’œ


πŸ¦‹ See Also πŸ¦‹

Go read them, they're part of the lore, iykyk πŸ“šβœ¨


Sign-off time bestie πŸ’– This whole thing is perl v5.34.0, dated 2022-02-06, from the User Contributed Perl Documentation manual page Form::...uration(3pm). Slay, stay formatted, and always pass type => 'price' πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from