I tried using Leanan's code almost exactly. The only change I made was
to remove the quotes around the filenames. I still get the following error:
|"Can't locate object method "elements" via package
"HTML::FormFu::Element::Text"
I'm sure this is referring to the 'elements:' line in the subconfig.
---
elements:
- type: Submit
name: submitted
value: Submit
|
|If I remove those lines, it displays the button, but as a text field.|
If I put in a fieldset it then gives me a similair error.
- type: Fieldset
legend: Test Fieldset
element:
- type: Text
name: Test1
label: Test 1
The error it gives is :
|"Can't locate object method "legend" via package "HTML::FormFu::Element::Text"|
If I use a config file with two text elements or more, it displays only
the last text box. This is my entire subconfig file.
- type: Text
name: Test1
label: Test 1
- type: Text
name: Test2
label: Test 2
This is the output:
<div class="text label">
<label>Test 2</label>
<input name="Test2" type="text" />
</div>
Leanan Sidhe wrote:
I use subconfigs, and it works fine. Here is how mine is set up:
My base config:
---
elements:
#stuff like action,indicator, etc
load_config_file:
- 'MyAction\config_a.yml'
- 'MyAction\config_b.yml'
# repeat as necessary for all sub configs.
A sub config:
---
elements:
- type: Block
nested_name: foo
elements:
#text boxes, selects, etc.
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu