# Form field input is being cleared when embedding into Wordpress

**URL:** <https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986>\
**Category:** Lead Capture Tools\
**Tags:** forms\
**Created:** [March 10, 2021, 7:54pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986 "2021-03-10T19:54:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![biomeme-tcook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biomeme-tcook/32/97852_2.png) [@biomeme-tcook](https://community.hubspot.com/u/biomeme-tcook)\
**Post date:** [March 10, 2021, 7:54pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/1 "2021-03-10T19:54:10Z")

</div>

We have a few Hubspot forms embedded on our Wordpress pages. They have been functioning as intended for a long time now and no changes have been made. Now, when you type into the fields and move on to the next, your previous input is erased/cleared. This appears to _only_ be happening when embedded. Accessing via standard share link works just fine.

Any ideas?  
Examples:

> **[Contact Us for More Information | Biomeme](https://biomeme.com/contact-us/)**
>
> Whether you have questions about our innovative molecular testing, our platforms, or infectious diseases, we can help. Contact us here for more information.

> **[How Our Field-Ready Molecular Testing Aids Researchers | Biomeme](https://biomeme.com/environmental-dna/a-guide-to-environmental-dna/)**
>
> When it comes to One Health and pandemic preparedness, Biomeme's portable, real-time, point-of-need molecular testing platforms are essential equipment for field researchers in any ecosystem.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [March 10, 2021, 8:23pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/2 "2021-03-10T20:23:56Z")

</div>

Hi @biomeme-tcook

It looks like [Autoptimize](https://wordpress.org/plugins/autoptimize/) (your speed optimising plugin) is creating an issue that’s breaking the Javascript.

I recommend you have a play with yourAutomptimize settings and/or upgrade the plugin.

Cheers

Mike

---

<div class="post-metadata">

**Author:** ![biomeme-tcook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biomeme-tcook/32/97852_2.png) [@biomeme-tcook](https://community.hubspot.com/u/biomeme-tcook)\
**Post date:** [March 10, 2021, 8:37pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/3 "2021-03-10T20:37:12Z")

</div>

Hey [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) - appreciate the quick response!

I deactivated that plugin, but the issue persists. Any other ideas?

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [March 10, 2021, 8:54pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/4 "2021-03-10T20:54:07Z")

</div>

Hey, it looks like the pages is using a cache… probably Autoptomisze.

You will want to clear the cache before you disable the plugin (because the cache will store a snapshot of the broken code).

Did that work?

Mike

---

<div class="post-metadata">

**Author:** ![biomeme-tcook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biomeme-tcook/32/97852_2.png) [@biomeme-tcook](https://community.hubspot.com/u/biomeme-tcook)\
**Post date:** [March 10, 2021, 9:12pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/5 "2021-03-10T21:12:17Z")

</div>

Unfortunately not.

Emptied the cache via Autoptimize and deactivated the plugin, issue persists. Also tried deleting the cache via Autoptimize and keeping the plugin active but disabled optimizing of JS and CSS in the plugin settings, but no luck.  
The plugin is back to original settings right now and active.

---

<div class="post-metadata">

**Author:** ![biomeme-tcook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biomeme-tcook/32/97852_2.png) [@biomeme-tcook](https://community.hubspot.com/u/biomeme-tcook)\
**Post date:** [March 10, 2021, 9:28pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/6 "2021-03-10T21:28:37Z")

</div>

[@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) It definitely seems to be related to Autoptimize, though. Going to continue playing around a bit.

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [March 10, 2021, 9:37pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/7 "2021-03-10T21:37:24Z")

</div>

Looks like you got HubSpot working but now JQuery scripts are firing before JQuery is loaded.

```lia-code-sample
Uncaught TypeError: $(...).parallax is not a function

```

---

<div class="post-metadata">

**Author:** ![biomeme-tcook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/biomeme-tcook/32/97852_2.png) [@biomeme-tcook](https://community.hubspot.com/u/biomeme-tcook)\
**Post date:** [March 10, 2021, 9:42pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/8 "2021-03-10T21:42:56Z")

</div>

Looks to be working now. Multiple attempts at clearing Autoptimize cache and disabling plugin appear to have done the trick. Not ideal disabling such a plugin, but up and running!

Will work through this a bit more to see if we can tweak settings to be compatible.

Thanks for your help in narrowing it down to Autoptimize.

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [March 10, 2021, 9:44pm UTC](https://community.hubspot.com/t/form-field-input-is-being-cleared-when-embedding-into-wordpress/32986/9 "2021-03-10T21:44:41Z")

</div>

You’re welcome @biomeme-tcook

I’ve been through similar fun and games recently.

Best to double check it in a clean browser and mobile too.

Cheeers

Mike
