Embeding Javascript form

Hi Webflow Community,

I am currently trying to embed a Javascript form into a webflow page that is 56,000 Characters and am having trouble. I am not a coder so I am having some trouble with this. Does anyone know how to do this? Thank you kindly in advance for any help.

So your are bumping up against a limitation on an embed. The solution would be to include the script, hosted at another public URL. Webflow does not allow for hosted scripts. Which service to use would be up to you. I would recommend a CDN for speed.

Example; Keycdn offers 1GB of transfer for .04 per GB up to first 10TB. That's CHEAP. Amazon has a free tier on AWS, just more work to set up. Digital Ocean has spaces accounts at 5 with * 250 GB of storage, 1 TB of outbound transfer, and unlimited uploads. You could use any of these for all your clients.

There are some other free options, but you usually get what you pay for. A slow loading script can slow your site down.

I am sure others will have good suggestions as well. Have a great day!

Hi Jeff,

Thanks so much for getting back to me. If I have google docs or Dropbox would those work? Once I host it somewhere, how do I go about linking it to a HTML embed code block? Basically its a javascript form, so how would I embed it then in website page? Thanks again for the help, really appreciate it.

If I was to choose, I would opt for Dropbox. There are plenty of blog posts on the subject. A quick google search will lead you to a solution.

“Host javascript on dropbox”

A hosted script is pretty simple to use. First you upload the script to a hosted location (that supports SSL), Get the URL to use in as the src attribute, then reference it in the before body close or head. With DB you need to share the file and get the link.

Example script to place in your projects custom code settings (it does not exist).

<script src="https://some.wonderful-host.com/script-you-uploadeded.js">
</script>

Awesome thank you so much. So you host it on Dropbox, get the url and then do put an HTML embed div block on a page and past that code? Can you then style it with the designer or do you need the CSS?

I just checked dropbox and it looks like they moved the abilty to share a link to a file like you want, to a Pro plan. So you need to do some research on your own for an alternative. I will say this, JavaScript has lots of power, I would block any access to scripts sitting out at public places where I could not determine who was providing it.

As to deployment, it all depends on what you are embedding. Wherever you got the code from should have instructions for you to follow.

You can learn more about custom code in the Webflow University. For HTML, CSS, and JavaScript learning, I suggest you visit the Mozilla Developer Network (MDN)

Good luck.

Hi Jeff thanks so much really appreciate your help. All the best.

1 Like