Show a custom success message in a Webflow Form default Success state

Show a custom success message after a Webflow form submission. When a user submits your Webflow form, they see success text; we're going to dynamically update that text, based on information the user enters into the form.

Demo Example

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Code

<script>
document.addEventListener('DOMContentLoaded', function () {
  	console.log("Hello Finsweet")
  }
})
</script>
!
We can not copy-paste TypeScript into Webflow. TypeScript must be compiled to JavaScript. For copy-paste into Webflow, choose JavaScript.
What is TypeScript? 🡭
<script>
document.addEventListener('DOMContentLoaded',
	function () {    
  	const WAIT_TIME = 4500;
  }
})
</script>
!
Copy-paste this script into your Webflow project body.