I created the kentico form in CMS.
Its is working fine.
After form submission the success message will be showing.
Well technically you can put your script in Display text (General Settings):
Here is the example
It's working fine.
Please, sign in to be able to submit a new answer.