[html-formfu] Syntax for $form->element->repeat(5)
scott at simpzoid.com
scott at simpzoid.com
Mon Jul 23 10:02:16 GMT 2012
I have the following form.conf file
constraints Required
<elements>
<constraints>
min 1
max 10000
type Range
message Required. Digits only, please.
</constraints>
filter TrimEdges
filter HTMLEscape
name textfield1
type Text
label textfield1
<attributes>
title Enter an integer between 1 and 10 000.
</attributes>
</elements>
<elements>
type Repeatable
name row
tag span
<elements>
name foo
type Text
label textrepeat
<attributes>
title Enter some text.
</attributes>
</elements>
</elements>
<elements>
value Submit
name submit
type Submit
</elements>
indicator submit
And the relevant bit of the Catalyst controller is:
sub formfu_create :Chained('base') :PathPart('formfu_create') :Args(0)
:FormConfig {
my ($self, $c) = @_;
my $form = $c->stash->{form};
$form->element->repeat(5);
$form->process;
}
The controller dies because it cannot find HTML/FormFu/element.pm. I have
tried many versions of the statement $form->element->repeat(5) but cannot
find the correct syntax.
I would be grateful if someone could point out the correct syntax for:
$form->element->repeat(5)
Scott
More information about the HTML-FormFu
mailing list