简体   繁体   中英

Zend_Form from ini, set multiOptions with string values

I'm trying to configure a form for Zend_Form using Zend_Config_Ini, and wish to set the options for a select element in the .ini file.

This works fine for options with single string values, ie

user.exampleform.elements.subject.options.multiOptions.example = "Example Label" 

However, I can't work out how to use a string for the value, ie "example choice"

I'm using Zend Framework 1.9.3PL1.

Looking at the code of Zend_Form_Element_Multi::addMultiOptions

user.exampleform.elements.subject.options.multiOptions.example.key = "Example Choice"
user.exampleform.elements.subject.options.multiOptions.example.value = "Example Label"

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