Zend Framework - Add new input element using javascript

前端 未结 2 535
孤城傲影
孤城傲影 2020-12-10 07:08

I\'m working on a project using Zend Framework.

I\'m creating a form on which users can add a set of elements by pressing a + sign.

Zend framework uses subfo

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 07:54

    One suggestion would be to define all input fields that you want to provide using zend form.

    But when the form is displayed you could hide certain fields and make them visible by clicking on +.

    I think this is the most simple approach because for adding decorators and stuff you would need to change php files on client side and this is not possible.


    Another suggestion, you could define several forms. Clicking on + redirectes the user to another form with an added field.

提交回复
热议问题