Complex gravity form performance issue fix

I’m on the hunt for a solution to help fix a performance issue I have encountered with a complex gravity form build.

Background into the issue

I am hoping you can be of some assistance. I am in desperate need for a solution that possibly could involve one or many of your perks.

I have built quite a complex ‘Consultation Tool’ in Gravity Forms. The form asks a series of questions and at the end based on your answering recommends WooCommerce products to you. How the questions are scored are 1, 3 and 5. How I count these values is by using hidden fields with default values of 1, and then using a number field and calculations to add them up. I have then set up hidden fields as ‘Rules’ to count how many 1s, how many 3s and how may 5’s and based on this set up conditional logic shortcodes with woocommerce product shortcodes. This all works - out the box.

The issue I face is it is a huge form. around 60 questions, each with multiple hidden fields. This brings the fields to 200+. The problem arises that the browser takes too long to process the hidden fields and the conditional logic - as I am making using of multiple form pages - Resulting in a poor user experience.

My task is now to find a solution so that it can be more optimized and run faster. I have included an export of the form below if anyone can assist?

This is the feedback I got from Gravity Forms:

"When you have a lot of conditional logic rules in your form the browser has to process and evaluate all of them to determine which fields, sections or pages needs to be shown or hidden, this is done at client side (the browser) and unfortunately browsers are not super fast doing these tasks. Checking your form I can see it’s a huge form indeed with 228 fields.

Also some conditional logic use cases can add extra work to the browser, e.g. if you’re using conditional logic to show/hide a field and also using this same field as value in another field conditional logic that would make the browser to be constantly checking both fields rules, creating a loop and increasing the CPU resource usage of the browser.

So I’m afraid you will need to double check all your conditional logic rules one by one according to the above to prevent using conditional logic loops. If you’re not using any conditional logic rule like this in your form, the only workaround for improving the conditional logic performance would be to reduce the number of fields or split your form in many smaller forms.

In the following tutorial you can see how pass data from one form to another if you need it: https://docs.gravityforms.com/using-confirmation-query-strings-to-populate-a-form-based-on-another-submission/
and you can find also a third-party add-on that uses a different approach to pass data between forms https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/ feel free to ask any question about it to its author https://gravitywiz.com/have-a-question-about-gravity-perks/"

I have reached out to GravityWiz but my concern with easy pass through and splitting up the form is the conditional logic results for woocommerce as I would need to tally up the totals for the whole form.

This is a project I have built for a client and it is the final piece of the puzzle and unfortunately now I sit with an issue I’m not entirely sure how to resolve.

Is this something someone can assist with? I can provide an export of my form setup if needed. Thanks

I did find this approach quite interesting: https://codeseekah.com/2017/09/02/large-and-laggy-gravity-forms/

LINK TO JSON export: https://drive.google.com/file/d/11vhgkNvcLor8rb_TwuwXTkB6yVt-bf6-/view?usp=sharing

I actually authored that codeseekah.com piece on Large and Laggy Gravity Forms :slight_smile:
Huge and rampant issue . It has helped in many cases.

Happy to consult -> gennady[at]kovshenin[dot]com

G.

Did you try dividing the form up onto several pages?

Hi Bryan,
This seems to be an interesting use case for Gravity forms and I am glad to take this on as it well within my skill set.
Feel free to reach out to me on andrewjohnson56782@gmail.com
Cheers and Have a great day ahead,
Andrew

I would suggest looking into this plugin to help with calculations. It helped me with a complex gravity form using advanced calculations. Just a thought. I have a similar issue and thought i’d throw this out for consideration. https://codecanyon.net/item/gravity-forms-advanced-calculations/25071847

Rather than use GF conditional logic, which slows down the form load speed, I’ve found it useful to use this plugin and the IF / THEN statements. Just food for thought.

2 Likes

i am so happy to see that the issue have been solved. Please keep sharing this type of post. Looking fort the same info.

One Vanilla