view release on metacpan or search on metacpan
examples/forms/vertically-aligned.yml view on Meta::CPAN
---
id: form
auto_id: '%n'
auto_fieldset:
legend: A fieldset
elements:
- type: Hidden
name: h1
- type: Text
name: t1
label: a Text element
- type: Text
name: t2
label: another, with a comment
examples/html/checkboxgroup-html.html view on Meta::CPAN
@import "../css/vertically-aligned-ie.css";
</style>
<![endif]-->
</head>
<body>
<a href="../forms/checkboxgroup.yml">Form config file</a><br/><br/>
<form action="" method="post">
<fieldset class="checkboxgroup legend">
<legend>Fancy Checkboxgroups</legend>
<span>
<span class="subgroup">
<span>
<input name="foo" type="checkbox" value="1a" checked="checked" />
<label>item 1a</label>
</span>
<span>
<input name="foo" type="checkbox" value="1b" />
<label>item 1b</label>
</span>
examples/html/checkboxgroup-html.html view on Meta::CPAN
<input name="foo" type="checkbox" value="2a" checked="1" />
<label>item 2a</label>
</span>
<span>
<input name="foo" type="checkbox" value="2b" />
<label>item 2b</label>
</span>
</span>
</span>
</fieldset>
<fieldset class="checkboxgroup legend">
<legend>width 50%</legend>
<span>
<span class="subgroup" columnWidth=".5">
<span>
<input name="foo" type="checkbox" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo" type="checkbox" value="1b" />
<label>item 1b</label>
</span>
examples/html/checkboxgroup-html.html view on Meta::CPAN
<input name="foo" type="checkbox" value="2a" />
<label>item 2a</label>
</span>
<span>
<input name="foo" type="checkbox" value="2b" />
<label>item 2b</label>
</span>
</span>
</span>
</fieldset>
<fieldset class="checkboxgroup legend">
<legend>Without groups</legend>
<span>
<span>
<input name="foo2" type="checkbox" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo2" type="checkbox" value="1b" />
<label>item 1b</label>
</span>
<span>
<input name="foo2" type="checkbox" value="2a" />
<label>item 2a</label>
</span>
<span>
<input name="foo2" type="checkbox" value="2b" />
<label>item 2b</label>
</span>
</span>
</fieldset>
<fieldset class="checkboxgroup legend">
<legend>one column</legend>
<span columns="1">
<span>
<input name="foo3" type="checkbox" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo3" type="checkbox" value="1b" />
<label>item 1b</label>
</span>
<span>
examples/html/radiogroup-html.html view on Meta::CPAN
@import "../css/vertically-aligned-ie.css";
</style>
<![endif]-->
</head>
<body>
<a href="../forms/radiogroup.yml">Form config file</a><br/><br/>
<form action="" method="post">
<fieldset class="radiogroup legend">
<legend>Fancy Checkboxgroups</legend>
<span>
<span class="subgroup">
<span>
<input name="foo" type="radio" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo" type="radio" value="1b" />
<label>item 1b</label>
</span>
examples/html/radiogroup-html.html view on Meta::CPAN
<input name="foo" type="radio" value="2a" />
<label>item 2a</label>
</span>
<span>
<input name="foo" type="radio" value="2b" checked="checked" />
<label>item 2b</label>
</span>
</span>
</span>
</fieldset>
<fieldset class="radiogroup legend">
<legend>Without groups</legend>
<span>
<span>
<input name="foo2" type="radio" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo2" type="radio" value="1b" />
<label>item 1b</label>
</span>
<span>
<input name="foo2" type="radio" value="2a" />
<label>item 2a</label>
</span>
<span>
<input name="foo2" type="radio" value="2b" />
<label>item 2b</label>
</span>
</span>
</fieldset>
<fieldset class="radiogroup legend">
<legend>one column</legend>
<span columns="1">
<span>
<input name="foo3" type="radio" value="1a" />
<label>item 1a</label>
</span>
<span>
<input name="foo3" type="radio" value="1b" />
<label>item 1b</label>
</span>
<span>
examples/html/vertically-aligned-html.html view on Meta::CPAN
</style>
<![endif]-->
</head>
<body>
<a href="../forms/vertically-aligned.yml">Form config file</a><br/><br/>
<form action="" enctype="multipart/form-data" id="form" method="post">
<fieldset>
<legend>A fieldset</legend>
<input name="h1" type="hidden" id="h1" />
<div class="text label">
<label for="t1">a Text element</label>
<input name="t1" type="text" id="t1" />
</div>
<div class="text comment label">
<label for="t2">another, with a comment</label>
<input name="t2" type="text" id="t2" />
<span class="comment">
comment here!
examples/html/vertically-aligned-html.html view on Meta::CPAN
</optgroup>
<option value="3">non-optgroup</option>
<optgroup label="opt2">
<option value="4">four</option>
<option value="5">five</option>
</optgroup>
</select>
</div>
</fieldset>
<fieldset>
<fieldset class="radiogroup legend">
<legend>a RadioGroup element</legend>
<span>
<span>
<input name="rg1" type="radio" value="one" id="rg1" />
<label for="rg1">One</label>
</span>
<span>
<input name="rg1" type="radio" value="two" id="rg1" />
<label for="rg1">Two</label>
</span>
</span>
</fieldset>
<fieldset class="radiogroup legend">
<legend>another styled vertically</legend>
<span class="vertical">
<span>
<input name="rg2" type="radio" value="one" id="rg2" />
<label for="rg2">One</label>
</span>
<span>
<input name="rg2" type="radio" value="two" id="rg2" />
<label for="rg2">Two</label>
</span>
</span>
</fieldset>
<fieldset class="radiogroup legend">
<legend>another, styled vertically, with sub-groups</legend>
<span class="vertical">
<span class="subgroup">
<span>
<input name="rg3" type="radio" value="1" id="rg3" />
<label for="rg3">one</label>
</span>
<span>
<input name="rg3" type="radio" value="2" id="rg3" />
<label for="rg3">two</label>
</span>
lib/HTML/FormFu/ExtJS.pm view on Meta::CPAN
Hidden => "hidden",
Radio => "radio",
Select => "combo",
Fieldset => "fieldset",
);
for ( @{ $self->get_elements() } ) {
next if ( $_->type eq "Submit" || $_->type eq "Button" );
tie my %obj, 'Tie::Hash::Indexed';
if ( $_->type eq "Fieldset" ) {
%obj =
( items => \ext_items($_), title => $_->legend, autoHeight => 1 );
} elsif ( $_->type eq "SimpleTable" ) {
my @tr = grep { $_->tag eq "tr" } @{ $_->get_elements() };
my @items;
push( @items, ext_items($_) ) for (@tr);
#die Dumper(@items);
%obj = ( layout => "column", items => \( join( ",", @items ) ) );
} elsif ( $_->type eq "Block" ) {
if ( $_->tag eq "tr" ) {
return ext_items($_);
lib/HTML/FormFu/ExtJS/Element/Fieldset.pm view on Meta::CPAN
use utf8;
use HTML::FormFu::Util qw(
xml_escape
);
sub render {
my $class = shift;
my $self = shift;
my $title = $self->legend;
my $parent = $self->can("_get_attributes") ? $self : $self->form;
return {
items => $self->form->_render_items( $self ),
$title ? (title => xml_escape( $title )) : (),
autoHeight => 1,
xtype => "fieldset",
nestedName => $self->nested_name,
$parent->_get_attributes( $self )
};
t/elements/fieldset.yml view on Meta::CPAN
---
attrs:
standardSubmit: 1
elements:
- type: Fieldset
nested_name: outer
legend: Fieldset Label
elements:
- type: Text
name: test2
label: Test
constraints:
Required