开发者

Adding form elements to a form powered by Zend_Form

I have a huge and complex form, and I have build it using Zend_Form. There a开发者_如何学运维re multiple places in the form where the user can add elements on click. Currently, if the user submits the form, and the validation fails - the elements added by the user are not retained - as they were not a part of the form. Is there a natural way to add them as a part of the form [emphasis on natural]?


Presumably you are adding new elements to the form using Js.

So you should use Js to populate some hidden field with information about what the user has added to the form. When the form is submitted read in this data and automatically re-add those form elements.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜