HTML::...:Blocks(3pm)

πŸ“¦
version 0.40068 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

🌸 NAME 🌸

okay bestie, welcome to HTML::...:Blocks(3pm) from the User Contributed Perl Documentation ✨. This is HTML::FormHandler::Blocks β€” a role that gives you the ability to render your form in arbitrary 'blocks', instead of by fields. It's literally here to arrange form layout using blocks, and this role is included by default in HTML::FormHandler, no cap πŸ’….

✨ VERSION ✨

version 0.40068 β€” iconic, periodt πŸ’–.

πŸ¦‹ SYNOPSIS πŸ¦‹

bestie, this is the whole main-character move: you get to render your form in arbitrary blocks, and the synopsis is giving exactly this energy:

package MyApp::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';

sub build_render_list {[ 'foo', 'fset' ]}
has_field 'foo';
has_field 'bar';
has_field 'nox';
has_block 'fset' => ( tag => 'fieldset', render_list => ['bar', 'nox'] );;
....
$form->render;

Blocks live in the HTML::FormHandler::Widget::Block:: namespace. The default, non-typed block is HTML::FormHandler::Widget::Block. Provide a type for custom blocks:

has_block 'my_block' => ( type => 'CustomBlock', render_list => [...] );

You can also build blocks with a 'block_list' attribute, or the builder for it, 'build_block_list' β€” highkey handy 🫢.

Rendering with blocks is supported by the rendering widgets. Render::Simple doesn't do it, though it would be possible to make your own custom renderer. fr fr, that's the vibe check.

πŸ’– AUTHOR πŸ’–

FormHandler Contributors - see HTML::FormHandler β€” shoutout to the whole crew, they ate πŸ’–.

This software is copyright (c) 2017 by Gerda Shank.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, it's free software πŸ’….


kisses πŸ’‹ β€” this page was served by perl v5.34.0 on 2022-03-25, and the page itself is HTML::...:Blocks(3pm) πŸŽ€πŸ¦‹.

πŸ“¦ where this page comes from