Hi all and thanks in advance.

I've got an INI file for configuring a series of Zend SubForms and I'm
trying to see if there's a way I can condense the following code...
---------
$config = new Zend_Config_Ini('projectForms.ini', 'project form');

$subforms = array();

$subforms['title'] = new Zend_Form_SubForm($config->project->form->title);
$subforms['dates'] = new Zend_Form_SubForm($config->project->form->dates);
$subforms['resources'] = new
Zend_Form_SubForm($config->project->form->resources);
[...]

// Attach sub-forms to main form
$this->addSubForms($subforms);
---------

I have 11 subForms right now.  I'm wondering if there's a way I can just
feed the entire subForm INI object to the Form constructor and it'll create
all the subforms automatically.  I can't seem to find any details on this
and it seems "addSubForms()" only takes Form objects (or an array of Form
objects).

I'd like to see if something like this is possible...

----------
$config = new Zend_Config_Ini('projectForms.ini', 'project form');
$this->addSubForms($config->project->form);
----------

Cheers!
Fozzy
-- 
View this message in context: 
http://www.nabble.com/Quick-Question-one-SubForms-and-INI-files-tp19749538p19749538.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to