You are viewing limited content. For full access, please sign in.

Question

Question

Button Submits form and Opens Webpage or Form

asked on May 1, 2025

What is the best way to have a button close a form and open a new form? I have a process where I want the user to accept or deny a form. When they accept, I would like them to have a new process open and fill the variables with data from the previously submitted form. I am currently on Forms 11 and planning to move to 12 soon. I used to have this in JS on Forms 10, it is no longer working in the modern designer.

 

Thank you!

0 0

Replies

replied on May 1, 2025

You won't be able to "hijack" the click event of your submission buttons in the form designer, and you won't be able to close the current window. You can open a link in a new tab though. 

  1. Create a button on your form with a custom html element
  2. define the button with "onclick='rejectFormAction()'" event handler
  3. In the JS window define a function "window.rejectFormAction"

 

<button type="button" onclick="rejectFormAction()" class="my-custom-button">
  Reject
</button>
window.rejectFormAction = () => {
    // Change the state of the form or add an overlay
    // Overlay could say "you can now close this page" for example
   window.open('https://mylink.com', '_blank')
}

 

0 0
replied on May 1, 2025

When they accept the form, are you wanting them to get the same form with previously submitted data as a new instance or do you want a completely different process to be their next step?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.