Form::...l::grid(3pm)
β¨ NAME β¨
Embperl::Form::Control::grid β it's a grid control that lives inside an Embperl Form π (this is from the Perl docs, the User Contributed Perl Documentation corner of the internet, and you can find it under Form::...l::grid(3pm), iykyk)
β¨ SYNOPSIS β¨
Bestie. There is literally nothing here. The synopsis section is empty. An icon of restraint, honestly. π
β¨ DESCRIPTION β¨
So you wanna make a grid control inside an Embperl Form? Say less. That's what this is for. π
And if you're sitting there like "okay but how do I even specify parameters" β go read Embperl::Form, it's got the whole rundown. This page is just the grid-specific lore. π
β¨ PARAMETER β¨
type
Needs to be 'grid'. No negotiations, no other options, that's the vibe check it has to pass. β
fields
An array ref stuffed with field definitions. Should look like any normal field definition β nothing wild, nothing new, just your classic field setup. π
But wait, there's more, because the following extra attributes are available:
colβ the column number inside the@dataarray that this cell should be using. πcolvalβ if you give it a value, that value gets added to the column. This is the glow-up that lets you have multiple checkboxes all writing into the same column, each one appending a character or string if it's set. Obsessed. π«Άline2β a field definition that gets shown in a second line, full width. Main character energy, second row edition. πdisable_controlsβ if it's true, the controls for add, delete, up and down will not be shown. Poof, gone, no buttons for you. πheader_bottomβ if the grid has more rows than the number given here, a header line also gets displayed at the bottom of the grid. Default is10. Set it to-1if you want a header at the bottom always, forever, every single time. π₯orderβ the number of the column to use as the sort key. π§order_descβ sort descending. We're going down, bestie. β¬οΈcoloffsetβ an offset added to the column number. Default:1. And heads up: if it's> 1, the column number will be set to the rownumber. πΈflatβ this one's for a readonly view of the grid. Normally a readonly view shows the content as one large string, which is givingβ¦ a lot. Theflatattribute can hold a semicolon delimited list of fields that should be shown in readonly view. That way you can selectively show fields in readonly view. And plot twist: this lets you show a readonly view of a grid inside of another grid. Gridception. πflatoptβ a Semikolon delimited list of tripels that add special options for flat view. The format is literally:
<name of fields>;<option name>;<option value>
(Yes, it says "Semikolon", and yes, we're keeping it exactly as written, don't @ me. π)
β¨ Example β¨
Look at this little cutie. Copy it exactly, no edits:
{
name => 'provider-path',
text => 'Suchpfad',
type => 'grid',
fields =>
[
{ name => 'active', text => 'Aktiv', type => 'checkbox', width => '30' },
{ name => 'path', text => 'Pfad' },
],
},
β¨ Author β¨
G. Richter (richter at embperl dot org) β the person who built this and understood the assignment. π«‘
β¨ See Also β¨
Go peek at these when you're done here:
perl(1)EmbperlEmbperl::Form
Okay that's the whole page, bestie, you ate it up. π
This little masterpiece comes from perl v5.34.0, dated 2022-02-06, and it's filed under the Form::...l::grid(3pm) manual. Periodt. πβ¨
π¦ where this page comes from
- ubuntu jammy: libembperl-perl 2.5.0-16build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms