Coupon button doesn't work on mobile view

Hi,

We’ve persistently been having issues with Gravity Forms’ coupon button on mobile devices (and mobile preview on our browser while testing the issue).

What’s happening is that the coupon’s “Apply” button works just fine when the form is viewed and coupon code is entered on desktop, however once you enter the coupon code on mobile, you aren’t able to push the “Apply” button.

We’ve contacted Gravity Forms support twice now, one of their solutions was to exclude the pages with the form from caching:
"Checking your system report I can see that you have WP Fastest Cache enabled. Caching is known to cause weird issues like the one you’re experiencing with the Coupons field. Caching can be great for static pages where you don’t update the content, but not for pages where you expect dynamic data like a selling form.

I would recommend you to start by excluding pages with the form from caching. Your caching plugin vendor has a doc page for this purpose: https://www.wpfastestcache.com/features/exclude-page/"
We did that, and it didn’t help the problem.

Another solution was this:
“Based in our experience and the details of the issue I would recommend you to begin troubleshooting by checking for theme and plugins conflicts using the Debug add-on. It will allow you to perform the test easily disabling things for your logged in user only, not for your visitors. Make sure that you have a WP default theme without custom functions installed in the site (e.g. a fresh copy of Twenty Nineteen) before enabling the add-on, no need to activate it, just install it.”
We, of course, tried this approach too, and we found out that when we switched to Twenty Nineteen from the Child Theme we’ve been using that the coupon’s “Apply” button is working properly. The issue with that is that the design of the page is gone completely once we switch themes, and the page looks broken.

We’ve twice rebuilt the forms in question and while it somehow did make the coupon button work on mobile once, it doesn’t seem to be the solution to the issue at hand anymore. The conclusion to which we came is that something in the “Pro - Child Theme” is interfering with the Graviy Forms’ coupon “Apply” button function.

Any suggestions as to what could be done? We’re attaching information needed to log in to the live site and the staging site for testing purposes.

Hello Paper+Screen,

Thanks for writing in!

Please provide the username and password for this popup form:

Regards.

Hi @RueNel,

See the info attached in the secure note. Apologies!

Hello Paper+Screen,

It turns out that you have two sections on the page both containing the form with the same field IDs. I know that the sections were intended for desktop and smaller screens.

The problem is that Gravity form will only respond to button ID and IDs should always be unique. Once there is a duplicate IDs, the gravity form script will no longer work. To prove that, please create a test page with only one section and only one gravity form on the page.

Home this explains your issue briefly.

1 Like

Thank you, @RueNel, it seems that our problem has been resolved!

You’re welcome. Glad we’re able to help.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.