- Use
subform
for the tags - Use js to clone html
- Once form is submitted count number of tags, and adjust form config before validation
Dynamic number of fields in Zend Form
-
30-08-2022 - |
Question
So I'm trying to create a base form with Zend_Form
, which I'm going to somehow map to a model.
The thing is that some properties of the model can have multiple values, for instance tags. One piece of content can have unlimited tags. How can I reflect this in Zend_Form
. Would some kind of a JS-PHP combo be possible here? (I want people to have a plus sign which lets the add another textbox for a new tag)
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow