Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I use XML::Simple to configure HTML::FormFu?
    text
    copied!<p>I assume you can use XML::Simple with HTML::FormFu because FromFu uses Config::Any to load it's config data.</p> <p>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.</p> <p>I'm not doing something right... Here's the beginning of my xml file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;config&gt; &lt;indicator&gt;submit&lt;/indicator&gt; &lt;elements&gt; &lt;element type="FieldSet" name="overrides" label="Over Rides"&gt; &lt;attributes title="Use these fields to override the csv value with this constant value" /&gt; &lt;elements&gt; &lt;element type="text" name="client" label="Client" /&gt; &lt;element type="Select" name="bid_type" label="Bid Type"&gt; &lt;options bid="Bid" /&gt; &lt;options approved="Approved" /&gt; &lt;/element&gt; &lt;element type="text" name="client_pay" label="Client Pay" /&gt; &lt;element type="text" name="due_date" label="Due Date" /&gt; &lt;element type="text" name="start_date" label="Start Date" /&gt; &lt;element type="Radiogroup" name="category" label="Category"&gt; &lt;options grass_cut_initial="Grass Cut - Initial"/&gt; &lt;options grass_cut_recut="Grass Cut - Recut"/&gt; &lt;options secure="Secure"/&gt; &lt;options winterization="Winterization"/&gt; &lt;options rehab="Rehab" /&gt; &lt;options custom="Custom"/&gt; &lt;/element&gt; &lt;element type="text" name="contractor" label="Contractor" /&gt; &lt;element type="text" name="contractor_pay" label="Contractor Pay" /&gt; &lt;/elements&gt; &lt;/element&gt; </code></pre> <p>I'm getting this error:</p> <pre> [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" </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload