简体   繁体   中英

I am using an INI file format to create a Zend Form but I cannot seem to get the options array filled in from the ini

Is there a way I can get my the following function ported correctly to the the Zend_Form_Element? I have a custom element and i am passing my own options in for the details of what I am working on: below is the PHP and following will be the INI

$html = $this->helper->formBlah(array(
                'name'=>'foo',
                'value'=>'bar',
                'attribs'=>array('id'=>'boom','rows'=>10),
                'options'=>array(
                        'setup'=>array('mode'=>'exact')
                        )
        ));

now using this functions does the work perfect fine :-) but converting it to an ini is where I get lost in translations:

simple.elements.foo.type = "custom"
simple.elements.foo.options.label = "foo"
simple.elements.foo.id=boom
simple.elements.foo.options.attribs.rows = 10
simple.elements.foo.options.setup.mode = exact

now when I examine my object it looks as if it takes all options as attribs!

any assistance with this specific problem would be appreciated greatly :-D

Thanks a bunch!!

Try:

simple.elements.foo.type = "custom"
simple.elements.foo.options.label = "foo"
simple.elements.foo.id=boom
simple.elements.foo.options.attribs.rows = 10
simple.elements.foo.multiOptions.setup.mode = exact

And here for the related issue http://framework.zend.com/issues/browse/ZF-2711

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM