Form::...:radio(3pm)

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

πŸ’– NAME πŸ’–

Embperl::Form::Control::radio β€” bestie, this is a radio control that lives inside an Embperl Form πŸŽ€

It's from the User Contributed Perl Documentation collection, iykyk. Perl v5.34.0 energy, dated 2022-02-06, and we're gonna get into all of it πŸ’…


✨ SYNOPSIS ✨

okay so here's the whole vibe in one lil hashref, no cap:

{
type    => 'radio',
text    => 'blabla',
name    => 'foo',
values  => [1,2,3],
options => ['foo', 'bar', 'none'],
}

that's it. that's the whole thing. slay πŸ¦‹


🌸 DESCRIPTION 🌸

You use this when you wanna create a radio control inside an Embperl Form, periodt. If you're confused about how to specify parameters in general, go read Embperl::Form β€” it's the main character and it'll explain everything πŸ‘‘

πŸŽ€ PARAMETER πŸŽ€

kay so here's every single knob you can turn, one by one, bestie:

  • type β€” it literally has to be 'radio'. that's the whole job. no notes πŸ’…
  • name β€” this is the name of the radio control. sets what it's called, that's it ✨
  • text β€” this gets used as the label for the radio control. the lil text next to it 🏷️
  • values β€” gives you the values as an array ref for the radio control πŸ’œ
  • options β€” gives you the options as an array ref, and these are what actually get shown to the user. If you don't give any options, then the values from values get used instead. (so values is the fallback bestie, remember that 🫢)
  • vert β€” if you specify this, it arranges the radio button vertically. The number you give specifies how many <br>'s are used to separate the radio buttons. so like, the number = the gap between them πŸͺœ
  • ignorecase β€” if given, it ignores the case of the posted values in %fdat when it's selecting a radio button. so Foo and foo are the same girlie, no drama 🌈
  • addtop β€” an array ref containing items that should be added at the left or top of the radio buttons. Each item is itself an array ref with two entries: the first is the value, and the second is the option that gets displayed on the page. If the second one is missing, then the value (that first entry) is what gets displayed. Example time:
addtop => [ [1 => 'first item'], [2 => 'second item']]
  • addbottom β€” same deal but for the right or bottom of the radio buttons. Array ref, each item is an array ref with two entries: value first, displayed option second. If the second is missing, the value (first entry) gets displayed. Example:
addbottom => [ [9999 => 'last item'], [9999 => 'very last item']]
  • filter β€” if given, only the items where the value matches the regex you gave in "filter" are displayed. it's giving bouncer at the club, only the matching values get in πŸ’€βœ¨

πŸ‘‘ Author πŸ‘‘

G. Richter (richter at embperl dot org) β€” iconic, we stan 🫢

πŸ¦‹ See Also πŸ¦‹


and that's the whole page bestie, we ate and left no crumbs πŸ“πŸ’…

signing off with the receipts: this was written by perl v5.34.0, dated 2022-02-06, and it lives under the name Form::...:radio(3pm) β€” so go forth and make some radio buttons, no cap βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from