0

I have a huge and complex form, and I have build it using Zend_Form. There are 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]?

1
  • Currently I have a script that finds out how many new elements have been added and I pass that to the $form object, which then adds them to the form. Commented Jul 14, 2010 at 16:53

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.