开发者

custom Zend Form Element that combines 2 existing elements

开发者 https://www.devze.com 2023-03-07 07:23 出处:网络
I noticed that I\'m using the Element_Checkbox and Element_Text to开发者_高级运维gether a lot in my project. Is there a way to combine them together into a single element so that I can just do somethi

I noticed that I'm using the Element_Checkbox and Element_Text to开发者_高级运维gether a lot in my project. Is there a way to combine them together into a single element so that I can just do something like:

new Zend_Form_Element_Combo

I tried like at the documentation but I feel they complicate it a lot. I just want to bundle the 2 elements together.


Depending on what exactly you are trying to accomplish, you'll either what to just simply make a subform or a composite element. There is a great Zend Cast on the subject of composite elements.

0

精彩评论

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