开发者

Zend_Form from ini, set multiOptions with string values

开发者 https://www.devze.com 2022-12-10 08:57 出处:网络
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.

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, i.e.

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

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

I'm using Zend Framewo开发者_Python百科rk 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"
0

精彩评论

暂无评论...
验证码 换一张
取 消