Form::...ckboxes(3pm)

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

πŸ’– Form::...ckboxes(3pm) β€” the checkboxes page, but make it cute πŸ’–

okay bestie, welcome to the manual page for Embperl::Form::Control::checkboxes β€” it's giving User Contributed Perl Documentation, and honestly? iconic. this is the lil' control that makes a whole pile of checkboxes show up inside an Embperl Form. let's get into it πŸŽ€


✨ NAME ✨

Embperl::Form::Control::checkboxes β€” a multiple checkbox control inside an Embperl Form. yes, multiple. plural. the whole squad of checkboxes. 🫢


🌸 SYNOPSIS 🌸

look at this lil' hash ref, no cap:

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

that's the vibe. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, you use this to create a checkboxes control inside an Embperl Form. that's the job. that's what it does. 🧚

want the tea on how to specify parameters in general? go read Embperl::Form, bestie, it has the answers. this page is just about this control.

⭐ PARAMETER ⭐

okay here's the part where we go parameter by parameter, and yes we're doing all of them, no skipping, periodt.

  • type β€” needs to be 'checkboxes'. like, that's the whole thing. it has to be that string. no notes. πŸ’€
  • name β€” specifies the name of the checkboxes control. every control needs a name, and this is where you put it. πŸ‘‘
  • text β€” will be used as the label for the checkboxes control. it's the lil' caption above your checkbox pile, yk? 🌸
  • values β€” gives the values as an array ref of the checkboxes control. array ref. remember that. πŸ”₯
  • options β€” gives the options as an array ref that should be displayed to the user. and here's the cute part: if no options are given, the values from values are used instead. convenient! slay! ✨
  • vert β€” if specified, arranges the checkboxes button vertically. the number you give specifies how many <br>'s are used to separate the checkboxes buttons. so like, you control the spacing. you control the drama. πŸ’…
  • tab β€” if specified, arranges the checkboxes in a table. the number you give specifies the number of columns in one table row. grid mode: activated. 🌈
  • addtop β€” an array ref which contains items that should be added at the left or top of the checkboxes buttons. each item is itself an array ref with two entries: the first is the value, and the second is the option that is displayed on the page. and if the second one is missing, the value (the first entry) is displayed. example time:
  addtop => [ [1 => 'first item'], [2 => 'second item']]

see? first item, second item. putting stuff at the top. πŸŽ€

  • addbottom β€” an array ref which contains items that should be added at the right or bottom of the checkboxes buttons. each item consists of an array ref with two entries, the first is the value and the second is the option that is displayed on the page. if the second is missing, the value (first entry) is displayed. example:
  addbottom => [ [9999 => 'last item'], [9999 => 'very last item']]

last item AND very last item. the duality. 😭

  • filter β€” if given, only items where the value matches the regex given in "filter" are displayed. it's a filter. it filters. that's the whole personality. πŸ“

πŸ’œ Author πŸ’œ

G. Richter (richter at embperl dot org) β€” the icon who wrote this. respect. 🫢


🌟 See Also 🌟

go check these out, bestie, they're all part of the same universe:


and that's the page!! you made it to the end, proud of you fr fr πŸ’–

this little manual page was living its life as perl v5.34.0, dated 2022-02-06, filed under Form::...ckboxes(3pm) β€” so yeah, that's the source, the version and the date, all accounted for, mwah πŸ’‹

πŸ“¦ where this page comes from