Use the Run JavaScript action to run JavaScript when a form is saved or submitted. This gives you a direct way to add custom behavior to your forms in WordPress.
You can choose when the action runs: on save, on submit, or both. Enter your JavaScript in the action editor and save your changes in the sidebar.
The JavaScript can include straight text or WS Form variables. For example, you can output submitted values inside your script.