I assume you can use XML::Simple with HTML::FormFu because FromFu uses Config::Any to load it's config data.
However, I can't seem to find any sample xml configs being used with HTML::FormFu. Not only am I getting an error. I'm not sure my xml is structured correctly to create the desired form. For example, on options, formfu wants an array of array refs. But i'm pretty sure this xml will produce an array of hash refs.
I'm not doing something right... Here's the beginning of my xml file:
<?xml version="1.0" encoding="utf-8" ?>
<config>
<indicator>submit</indicator>
<elements>
<element type="FieldSet" name="overrides" label="Over Rides">
<attributes title="Use these fields to override the csv value with this constant value" />
<elements>
<element type="text" name="client" label="Client" />
<element type="Select" name="bid_type" label="Bid Type">
<options bid="Bid" />
<options approved="Approved" />
</element>
<element type="text" name="client_pay" label="Client Pay" />
<element type="text" name="due_date" label="Due Date" />
<element type="text" name="start_date" label="Start Date" />
<element type="Radiogroup" name="category" label="Category">
<options grass_cut_initial="Grass Cut - Initial"/>
<options grass_cut_recut="Grass Cut - Recut"/>
<options secure="Secure"/>
<options winterization="Winterization"/>
<options rehab="Rehab" />
<options custom="Custom"/>
</element>
<element type="text" name="contractor" label="Contractor" />
<element type="text" name="contractor_pay" label="Contractor Pay" />
</elements>
</element>
I'm getting this error:
[debug] Catalyst::Controller::HTML::FormFu::Action::FormConfig loading config file 'workorders/import' [error] Caught exception in myapsjobs::Controller::WorkOrders->import "Error parsing /home/jon/aps-dev/myapsjobs/root/forms/workorders/import.xml: /home/jon/aps-dev/myapsjobs/root/forms/workorders/import.xml:38: parser error : Premature end of data in tag config line 1 at /usr/local/share/perl/5.10.0/HTML/FormFu/ObjectUtil.pm line 502"