[html-formfu] simple case with Repeatable and
HTML::FormFu::Model::DBIC
Alex Povolotsky
tarkhil at over.ru
Sat Jan 16 21:28:25 GMT 2010
Hello!
I have a simple case I'd like to automate
I have a list of files, presented in an SQL table
table filestocheck
fid int not null primary key auto_increment
path varchar(128) not null
I'd like to easily produce a list of files (there won't be more than 20,
so no paging required) with checkboxes to mark for deletion and an empty
line to add
config file seems to be quite straightforward
---
model_config:
resultset: Filestocheck
element:
- type: Repeatable
nested_name: ftc
counter_name: fid
model_config:
empty_rows: 1
elements:
- type: Hidden
name: fid
- type: Text
name: path
- type: Checkbox
name: remove
label: Delete record
model_config:
delete_if_true: 1
- type: Submit
name: submit
but HTML::FormFu dies with
Caught exception in Security::Controller::Admin->filestocheck "Error
parsing
/usr/home/tarkhil/work/Security/root/forms/admin/filestocheck.yml:
YAML::XS::Load Error: The problem:
did not find expected key
was found at document: 1, line: 24, column: 2
while parsing a block mapping at line: 2, column: 1
at /usr/local/lib/perl5/site_perl/5.10.1/HTML/FormFu/ObjectUtil.pm
line 502"
Maybe someone will point me to my mistake?
Alex.
More information about the HTML-FormFu
mailing list