Here is our scenario. we are working on a registration form.
Building the form for demographics is no problem, it has a static number of elements identified by the fields in our database: first name, last name, email, street address, blah, blah, blah...
The tricky part comes in when we want to give the person the ability to add a certain number of objects that may have multiple fields each. For example a registration form that allows you to register your family for an event. The primary person will enter the demographics as above. The "family" members repeating fields would be: name (text), TShirt (select), child under 10 (checkbox).
We want to repeat the text box, selection box and check box for however many children are in the family.
Can someone suggest how to manage that type of form using FormHandler?
We found it difficult to identify which "page" you were viewing / processing. I'm still not sure exactly when the "page" is identified. When a field validator fails at the top of the form, is the page set to next or current? What if the last field is the one that failed, is the page set then? In our situation, we need to call a function to add the dynamic fields based on one of the answers from a "page." The current page seemed incorrect in certain situations. We had to have the value of something that had not been posted yet based on the sequence of pages but the loop to add those fields had to be part of the file so the fields could be added to the $form object. I'll post some code after we clean it up a bit.
We found it easier to simply redirect the browser to a new form (new php file) with the number of "additional" questions to ask in the $_GET collection (keeping our master ID as well). In other words, we built a series of PHP files to simulate our own pages and each file could have X number of options which is passed on the querystring.