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)

Was it helpful?

Solution

  1. Use subform for the tags
  2. Use js to clone html
  3. Once form is submitted count number of tags, and adjust form config before validation
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top