# Update Hubspot javascript embed code in forms to make it Ajax friendly

**URL:** <https://community.hubspot.com/t/update-hubspot-javascript-embed-code-in-forms-to-make-it-ajax-friendly/21244>\
**Category:** HubSpot Ideas\
**Tags:** forms\
**Created:** [May 28, 2020, 8:58pm UTC](https://community.hubspot.com/t/update-hubspot-javascript-embed-code-in-forms-to-make-it-ajax-friendly/21244 "2020-05-28T20:58:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![buttercupncream](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/buttercupncream/32/53869_2.png) [@buttercupncream](https://community.hubspot.com/u/buttercupncream)\
**Post date:** [May 28, 2020, 8:58pm UTC](https://community.hubspot.com/t/update-hubspot-javascript-embed-code-in-forms-to-make-it-ajax-friendly/21244/1 "2020-05-28T20:58:48Z")

</div>

I have a Squarespace site and my forms are not showing on repeated visits, apparently, because the javascript in HubSpot forms are not ajax compatible, according to this: [https://forum.squarespace.com/topic/87058-why-doesnt-my-javascript-code-work-until-i-refresh-the-page](https://forum.squarespace.com/topic/87058-why-doesnt-my-javascript-code-work-until-i-refresh-the-page/)

Forms API is overly complicated [https://developers.hubspot.com/docs/methods/forms/submit\_form](https://developers.hubspot.com/docs/methods/forms/submit_form)

The solution is: Hubspot needs to update its javascript!

#endrant

---

<div class="post-metadata">

**Author:** ![rjonesSolaria](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rjonessolaria/32/77940_2.png) [@rjonesSolaria](https://community.hubspot.com/u/rjonesSolaria)\
**Post date:** [September 10, 2020, 7:50pm UTC](https://community.hubspot.com/t/update-hubspot-javascript-embed-code-in-forms-to-make-it-ajax-friendly/21244/2 "2020-09-10T19:50:42Z")

</div>

Yes please! I can’t put forms (hubspot or non-hubspot!) in lightboxes because of this.
