HTML::...:Button(3pm)

πŸ“¦
version 1.11 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTML::Widget::Element::Button πŸ’–

okay bestie, listen up β€” this is the manual page for HTML::Widget::Element::Button, straight out of the User Contributed Perl Documentation corner of your friendly neighbourhood section 3pm. It's the Button Element, and yes, it's exactly as iconic as it sounds. πŸ’…


✨ NAME ✨

HTML::Widget::Element::Button β€” the Button Element. That's it, that's the name, she's simple and she serves. πŸŽ€


✨ SYNOPSIS ✨

Like, here's the whole vibe in two lines:

$e = $widget->element( 'Button', 'foo' );
$e->value('bar');

See? You grab a Button element off your widget, name it 'foo', and then you set its value to 'bar'. Slay. ✨


✨ DESCRIPTION ✨

It's a Button Element. Button. Element. The whole personality. πŸ¦‹


✨ METHODS ✨

🌸 new

🌸 value

🌸 label

okay so this is the good part β€” the value of this Button element. It's also what the browser uses as the button's label. So like, the value and the visible text are the same thing here. Two jobs, one queen. πŸ‘‘

And heads up: label is literally just an alias for value. Same girl, different name. ✨

🌸 content

If you set this one, the element switches up and uses a button tag instead of an input tag. It's giving glow up. πŸ’…

And the value of content goes between the button tags β€” unescaped. Which means, bestie, you can put any html markup in there to display the button. Any. You have been warned, iykyk. 😭

🌸 type

The valid values are:

  • button
  • submit
  • reset
  • image

Pick one, any one. 🌈

🌸 src

If you set this, the element gets rendered as an image button, using this url as the actual image. πŸ–ΌοΈ

⚠️ And it automatically sets type to image for you. No cap, it just does it. πŸ™ˆ

🌸 retain_default

If this one is true, it overrides the default behaviour. So after a field is missing from the form submission, the xml output will contain the default value instead of being empty. Because sometimes you want the default to stay, and honestly? Same. 🫢

🌸 render

🌸 containerize


✨ SEE ALSO ✨

HTML::Widget::Element β€” go read that one next, bestie, it's the parent energy. πŸ‘‘


✨ AUTHOR ✨

Marcus Ramberg, mramberg@cpan.org. Iconic. πŸ’œ


✨ LICENSE ✨

This library is free software β€” you can redistribute it and/or modify it under the same terms as Perl itself. Periodt. πŸ’…


and that's the whole page, bestie!! πŸŽ€ This lil doc shipped with perl v5.36.0 and got dated 2023-08-10, so go forth and build buttons. You ate, no crumbs left. πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from