Why Form Widget Shows “An Error Occurred” Message and How to Fix It

When using your Elfsight Form widget, you might encounter the "An Error Occurred" message instead of a successful form submission. Don’t worry — this issue is easy to identify and fix, and this guide will walk you through several simple solutions.

In this article

About the “An Error Occurred” Message

When submitting a form, you may sometimes see the following error message:

An error occurred when submitting the form, please try again later

Here’s what it looks like in the widget:

This typically happens when the widget is embedded within an iframe that uses srcdoc or other restricted iframe setups. When you have reCAPTCHA enabled, these iframe limitations prevent it from loading correctly, resulting in a failed submission.

The issue often arises with website builders or CMS platforms, such as Hostinger, GoDaddy, Wix, or others, that automatically embed content within iframes.

Below, we'll describe three methods to resolve it, depending on your website's CMS.

How to Fix the Error

To fix this issue and get your form widget working smoothly, try the following solutions based on your website’s platform:

Install the Widget Without an Iframe

If you’re using one of the platforms listed below, you can reinstall your form widget without an iframe by following these guides:

Instructions for Hostinger
Instructions for GoDaddy
Custom Сomponent for Framer
Guide for Wix via Custom Code (for users with any paid Wix plan)
Guide for Wix via Custom Element (for Wix Premium plan and custom domain users)

Install the Widget Using a Responsive Iframe

If your platform doesn’t support installing the widget without an iframe, you can use a responsive iframe instead. First, you’ll need to create a Share Link for your widget:

1
Get your Widget ID

Open your widget in the Elfsight Dashboard and copy its ID from the URL (after the last slash):

2
Create your Share Link

Remove the hyphens from your Widget ID and replace WIDGET-ID-WITHOUT-HYPHENS in the link below:

https://WIDGET-ID-WITHOUT-HYPHENS.elf.site
    

For example:

https://6b71ec7fb3ad4df7b4e6291714fe957f.elf.site
    
You won’t be able to preview the widget through this link, but it will appear correctly on your website after embedding the iframe code.

Now that you have your Share Link, add it to the code below in place of SHARE_LINK to create your responsive iframe:

<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.7/iframeResizer.min.js"></script> 
<iframe onload="iFrameResize({ log: false, checkOrigin: false })" src="SHARE_LINK" style="border: none; width: 100%" allow="fullscreen"></iframe>

Here's an example of the final code:

<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.7/iframeResizer.min.js"></script> 
<iframe onload="iFrameResize({ log: false, checkOrigin: false })" src="https://6b71ec7fb3ad4df7b4e6291714fe957f.elf.site" style="border: none; width: 100%" allow="fullscreen"></iframe>

Just replace the original widget installation code in your website’s backend with this one, and your form will start collecting submissions successfully. 🎉

Disable reCAPTCHA

There's one more solution — it's the simplest option and doesn't require reinstalling the widget. You can just disable reCAPTCHA in your widget settings. Here’s how:

1
Go to the Settings tab and select Spam Protection:
2
Toggle off the Enable ReCAPTCHA option:

That’s it — once reCAPTCHA is disabled, your form should submit successfully without showing the error message.


We hope this article helped you resolve the issue with your form submissions! If you face any difficulties with reinstallation or need further assistance, don't hesitate to contact our Support Team — we're happy to help! 🙌

Did this article answer your question? Share your feedback: Thanks for sharing your feedback. It helps us grow! There was a problem submitting your feedback. Please try again later.

Still looking for assistance? Contact Us Contact Us