How to Make a Dynamic Registration Form and Checkout Form

By: Ashley Headrick | Asked: 03/14/2023
ForumsCategory: General questionsHow to Make a Dynamic Registration Form and Checkout Form
Ashley Headrick asked 2 years ago

How would you do this with Formidable Forms…  

This is for a cattle breed registry.  

1. I want a user to fill out a registration application form.

2. They can choose to register another animal or proceed to Checkout Form

3. If they decide to register another animal, the quantity and total price should increase on the checkout form  

I want them to be able to fill out as many cattle registration applications as they want, but each one increases the quantity on the checkout page.  

My immediate thought was repeater fields on the checkout page with the registration application form embedded. But you can’t have embedded forms in repeater fields.  

Then I thought I’d embed the registration application form on multiple pages and use conditional logic to direct people to the next page (to register another animal) or the final checkout page (counting the quantity of forms would be easy with this). BUT you can’t embed a form in a form more than once.  

I like the idea of the cattle registration application form being a different form (not just using repeater fields in checkout form) so cattle data can be easier to manipulate in views.   

I'm stumped...How would you work through this logic?

1 Answers
Bobby Clapp answered 2 years ago
I think for fluidity and manageability, I'd have 3 forms. I'd create a form to register a user, collecting whatever information you see fit. That's one form. Then I'd create another form that is the cattle registration (limited to logged in users). This form would have a field that is either hidden or admin only and would capture a value that you would default to (presuming it is a fixed fee). Then I'd create a view that displays all of the registered cattle with some intuitive linking around to get them to the check out page. Finally, I'd create a check out form. On this form you would use have a field called total and default that to [frm-stats id=X type=total user_id=current]. This would total up all of their entries. How you create the UX around all of this would be the driving force. You could use that same shortcode in the view, if you'd like them to know how much they are paying in their listing.
Ashley Headrick replied 2 years ago

Thank you! That's along the lines of what I was thinking.

What if the user logs in again and submits new forms that day, I don't want the cart function to add up all of their previous forms, just the ones that are unpaid.

I thought of having a hidden "paid" or "unpaid" field on the cattle registration form. But ideally I don't want an admin to have to login and change the status.

Bobby Clapp replied 2 years ago

It definitely gets more complicated at that point. How is a payment processed? If done digitally, maybe some sort of hook/function can be built to change field values automatically. If not, then manual interaction would be required. You can then get stats for a field where another field has specific values with: https://formidableforms.com/knowledgebase/add-field-totals-and-statistics/#kb-field-filters

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
crossarrow-right