The companion repo for a tutorial series on using JavaScript and TypeScript to handle Webflow forms.
Youtube playlist 👉 https://www.youtube.com/playlist?list=PLRVjQBYy10oRTe2ORzIyvb5fU1o6CYAxB
https://webflow.com/made-in-webflow/website/forms-with-js-example
I'm using a basic Webpack setup to serve my files locally so I can develop in Webflow. If you want to learn more about developing in Webflow I've made another video here 👉 https://www.youtube.com/watch?v=VWx5pHtlgNw.
-
Install packages
npm install
- Place this script tag in your Webflow Site.
<script src="http://localhost:8080/bundle.js" type="text/javascript" crossorigin="anonymous"></script>
- Run the webpack dev server
npm run serve
- Build the production JavaScript
npm run build
You will need the Vercel CLI if you want to serve the "api/do-something.ts" locally. If you wish to serve your file in another way, or hit a different endpoint, then don't bother with Vercel!