Form::...isplay(3pm)

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

πŸ’– Embperl::Form::Control::display β€” the vibe check

okay bestie, so this is a page from the User Contributed Perl Documentation set, and the module's full name is Embperl::Form::Control::display β€” it's the little control that's like "here's some text, look at it, don't touch it" inside an Embperl Form. A display-only queen. No editing, just serving looks. πŸ‘‘


✨ SYNOPSIS ✨

no cap, this is literally the whole shape of it:

{
type   => 'display',
text   => 'blabla',
hidden => 1,
name   => 'foo',
split  => 1
}

🌸 DESCRIPTION 🌸

So the tea is: you use this to create a display only control inside an Embperl Form. It shows stuff. That's the job. It's giving "read-only main character." πŸ¦‹

And if you wanna know how to actually specify parameters properly, go check out Embperl::Form β€” that's where the rules live.


πŸŽ€ PARAMETER πŸŽ€

the way that every single one of these matters, let's go:

  • type β€” has to be set to 'display'. Like, that's non-negotiable bestie, that's the whole identity. πŸ’…
  • text β€” this gets used as the label for the text display control. It's the little name tag. 🏷️
  • value β€” the value to display. If you don't give it one, then $fdat{<name>} gets used instead. And here's the cute part: if the data you hand over in value is an arrayref, then every element gets displayed on its own separate line. stack 'em up, slay. ✨
  • hidden β€” if you set this, an appropriate hidden input field gets created automatically for you. it just happens. iconic behaviour. πŸ™ˆ
  • name β€” this is used as the name for the hidden input field. πŸ‘‘
  • split β€” if set, it splits the value into an array at \t and then displays every array element on a new line. tab-separated? more like tab-separated-and-served. πŸ”₯
  • splitlines β€” if set, it splits the value into an array at \n and displays every array element on a new line. same energy, different delimiter. 🌈
  • value2text β€” runs the value prefixed with the given parameter through convert_text, so it can be translated. yes, that's spelled "paramenter" in the original and we're keeping it fr fr, character for character. πŸ’€

🫢 Author

G. Richter (richter at embperl dot org), A. Beckert (beckert@ecos.de)

give them their flowers, they built this. πŸ’


⭐ See Also


πŸ’– and that's the whole page bestie, no skips, no skimming, every single parameter accounted for. iykyk.

and for the little sign-off moment: this doc came from perl v5.34.0 and it's dated 2022-02-06 β€” so when you cite it, cite it with love. πŸŽ€ periodt. πŸ¦‹

πŸ“¦ where this page comes from