3 page form, last page repeater

By: P Galloway | Asked: 06/22/2022
ForumsCategory: How-to3 page form, last page repeater
P Galloway asked 2 years ago
I have a form that contains data on a family, the last page of the form is a listing of the children. I want the parent to be able to add a child and their information (extensive) without clicking through all 3 pages of the form, Any ideas? Thank YOU  
1 Answers
Victor Font answered 2 years ago
I worked on a STEM project for a major Pacific Northwest University. The requirement was to allow parents to register multiple children from the same family. This is a common requirement that is shared among many types of registration forms where multiple registrations are allowed. Nobody likes to enter information repetitively. Formidable makes it easy to copy values between fields by using shortcodes as default values. This works great for fields like phone number or last name. If there's a lot of information to keep in sync, binding the child fields with jQuery to the parental information that can be used for children also, such as address, or any field for that matter. Using jQuery for this assures the parent's information is the single source of truth. Change the parent's record and all bound children records change also. jQuery is front end only and this type of interaction takes place in the browser. We use a toggle to enable or disable binding in each section. If you are using a repeater field, it gets a lot more complicated because repeaters use Ajax to add/remove records. jQuery needs to be reinitialized after every new record is added. See this for further details: https://formidable-masterminds.com/repeaters-and-complex-jquery-operations/ As far as your question about not clicking through 3-pages. I don't think that can be avoided in a multi-page design. In a mutli-page form, every time you click the previous or next buttons, you are triggering an Ajax form submit. It doesn't submit your form in terms of saving your form to the database. What it does is change the field types so fields that don't belong on a specific page are hidden. If you examine your page's source code in the browser inspection tool, you see this behavior. I've never tested a multi-page form with the binding technique and I have no idea if it will work as expected. I created tabbed forms for that project because multi-page forms didn't exist back then.
Pamela Ferguson replied 2 years ago

Thank you! I was thinking that might be the case. Is there are way to add a page break into the repeater?

Pamela Ferguson replied 2 years ago

Thank you! I was thinking that might be the case. Is there are way to add a page break into the repeater?

Victor Font replied 2 years ago

I don't know. Are you trying to turn a repeater into a multi-page form?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community