Jump to content

custom Javascript code to embed in squarespace

Go to solution Solved by Beyondspace,

Recommended Posts

Hi, I hope someone can help me.

I need to change the Newsletter signup form on my client's website as she is migrating from using Convertkit to Kajabi.

I created the form in Kajabi, but the only embed code they give is Javascript (convertkit had an HTML option). After some research, I understand that I need to add extra code to embed a Javascript block in Squarespace. I've tested out various options, but nothing is working. Either the form is not showing up or it says there is an error in the form.

The code Kajabi provided is: 

<script src=https://tracy-forsyth.mykajabi.com/forms/2148635731/embed.js></script>

When I put this in the Javascript box, it just writes it out as text.

When I put this code in the HTML block, I get the following error - can't even see what the full message is!

image.thumb.png.bb0737318e8f2ddfd68fbf19968d4f83.png

 

How should this be written in the Code Block in Squarespace for the form to appear?

I'm not a coder so don't fully understand some of the articles/videos I've seen.

Thank you!

Link to comment
  • Replies 4
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
9 minutes ago, DimaBee said:

Hi, I hope someone can help me.

I need to change the Newsletter signup form on my client's website as she is migrating from using Convertkit to Kajabi.

I created the form in Kajabi, but the only embed code they give is Javascript (convertkit had an HTML option). After some research, I understand that I need to add extra code to embed a Javascript block in Squarespace. I've tested out various options, but nothing is working. Either the form is not showing up or it says there is an error in the form.

The code Kajabi provided is: 

<script src=https://tracy-forsyth.mykajabi.com/forms/2148635731/embed.js></script>

When I put this in the Javascript box, it just writes it out as text.

When I put this code in the HTML block, I get the following error - can't even see what the full message is!

image.thumb.png.bb0737318e8f2ddfd68fbf19968d4f83.png

 

How should this be written in the Code Block in Squarespace for the form to appear?

I'm not a coder so don't fully understand some of the articles/videos I've seen.

Thank you!

You can try checking your site in the Incognito mode of the browser. Edit mode of Squarespace will prevent running javascript code.

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment

Hi

I hope someone can help a non-coder here!  I've been going round in circles for days and I'm getting nowhere!

I am trying to replace the Newsletter Sign Up form my client currently has on her website, to a new form set up with our new platform Kajabi.  The embed code (which I am trying to insert into the Code Block) from Kajabi is only in Javascript - no HTML option.

After much research, I understand that I have to put the code in the Code Block under HTML (in JS, it will only appear as text).  and I need extra lines of code - I have tried many combinations of code I found online, but nothing has worked.

The code for the form from Kajabi is that I am trying to embed is:

<script src=https://tracy-forsyth.mykajabi.com/forms/2148635731/embed.js></script>

I get the attached error - can't even see the full error message.

Can someone please help and give me the exact code to enter into Squarespace so that the form appears correctly and works?

Thank you very much in advance!

Di

Screenshot 2024-06-11 at 14.31.17.png

Link to comment

@DimaBee It's not possible to convert JavaScript to HTML. JavaScript is a programming language, unlike HTML, which is a markup language. There isn't an exact HTML version of the embed script that you can directly input into Squarespace. Embed code you shared is from a different platform. To display embed code on Squarespace, you'll need a business plan/subscription. If the embed code doesn't work on a business plan, you should check the third-party platform that generated the embed code for any restrictions or issues.

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.