Form submissions not working with action

So when I use my form with ‘action’ + method = GET, it re-directs the user to my desired URL with appended form data – which is great.

However, now when users press the Submit button, Webflow isn’t registering that as a form submission and saving the Forms data under the forms section in Settings.

Is it possible to do both? Use ‘action’ while redirecting users to a dynamic URL as well as capturing them as form submissions within Webflow?

1 Like

Did you ever figure this out?

I’ve figured out a solution for this if you’re still looking.

The concept is that when the form is submitted, we use Jquery to click a hidden button which has the action URL placed instead.

So, for example, we have a normal form with no action URL set. This should submit as normal and send the form data to the forms section in Settings.

Add an HTML embed to the form with code that looks like the following:

<button type="submit" id="hidden-button" onclick="window.open('https://your-url-here.com')">Submit</button>

We then set the HTML embed to display:none so that it isn’t visible to visitors on the page.

In your site’s Footer Code, you then add the following script:

<script>
  $('.notification-form').submit(()=>{
    $("#hidden-button").click();
  });
</script> 

You’ll need to switch ‘.notification-form’ with your form’s class, and ‘#hidden-button’ with the ID of the button you’ve added in to the HTML embed.

Now, then the form is successfully submitted, it clicks the hidden button which opens up your URL in a new tab.

Hopefully that helps!

Hi @maxshepley,

Thanks for giving the solution you found !
Did you manage to get this script work on mobile?

I tested via several other ways but by submitting the form on mobile, I don’t retrieve the form via Webflow, I am however redirected to the desired link. :woman_shrugging:

Strange behaviour