Gravity Forms: Oops We Could Not Locate Your Form
We absolutely love Gravity Forms here at Digital Tactics.
It is by far the most useful and powerful form builder plugin out there for WordPress and in terms of the sheer time it saves in implementation, support and training costs (aside from all its powerful features and integrations) it is worth the license fee time and time again.
We develop a few add-ons for Gravity Forms and have performed some deep integrations with the product so know it quite well, but we were admittedly stumped when recently a client reported a “Oops We Could Not Locate Your Form” error message on form submission.
This appears to be a rare error message and we could only find a few posts in the Gravity Forms forums discussing potential reasons for it, the majority relating to themes and plugins causing a conflict somewhere, and these issues occurring with all forms in a site and not just one.
In our case the issue was very specific. It related to one form being used on one particular page in a WordPress multisite install.
All sites in the install were using the same custom WordPress theme built by us, all included the same few Gravity Forms addons we had developed, and across the network hundreds of working forms had been published already; so what was special about this one?
We checked how the form had been built, ran the preview and completed test a submission from the preview – all working fine, just like all other forms. Weird!
We disabled our add-ons and anything else that might be conflicting with Gravity Forms too. Same issue – fine from within the CMS; but delivering “Oops We Could Not Locate Your Form” when submitting via the page the form was embedded in.
What was it? Well, after exhausting all other routes we actually started to fall back to basics; the page content itself and what the user was actually doing.
It turns out the user was copying old forms from one site as html into the WordPress WYSIWYG editor and then setting up an equivalent gravity form to match the old one; comparing the two side by side in the page body before publishing. A fairly reasonable process to complete when performing a content migration against the clock.
On investigation of the html in the page we found that though the old form content had been deleted, the gravity forms shortcode was actually being wrapped in the <form></form> element of the old form; meaning that when the final form was rendered there were effectively two forms in the page the old one (plus its attributes) wrapping the new one (even though the old one had no other fields in it).
Now, we fixed this issue too quickly to determine just how the form submission was being garbled to the extent that Gravity Forms was actually able to throw an error (maybe the form actions from the old and new tags were the same (very likely) or maybe the browser was attempting to correct the html and causing some weirdness as a result) but the bottom line is this:
If you get this “Oops We Could Not Locate Your Form” message don’t go chasing down technical solutions right away.
Check the page content is right first – as (in our opinion) it’s by the most likely place an error will be found vs. the issue being an incompatibility with some add-on or theme!
If your page content is good (both in the editor and once rendered) and you don’t have any stray or unclosed form elements in the page, then start looking at your technical options 🙂
We hope this post helps you if you encouter this error, and for anyone wanting to check out gravity forms for themselves (to see why we rave about it) you can do so at http://www.gravityforms.com