Redirect via Webhook After Form Submission

@artur yes - I’ve just sent a video via chat so you can see. I don’t know why your request didn’t trigger 2 instances, but I’ve done a screen recording showing me submitting a single test form and it triggering 2 flows in Make (1 minute apart), then an error on the front end in Softr. Hopefully that recording helps?

@EnigmaXXIII I’m troubleshooting this right now and will get back asap.

@artur is there a way to accomplish this redirect (via Webhook response after form submission) without custom code?

We could enable it, but we need to have some convention like if the form sends us a response with the following response then we do redirect.

Let’s me discuss this with the team.

Thank you. The way it works with your code is great - with the spinner on the “submit” button. Doing it natively would be most appreciated.

Any luck? :slight_smile:

@eugene we will look into it next week :slight_smile:

{"redirect": "https://www.example.com", timeout: 1000}

we will most probably just build the functionality in

That would be amazing :slight_smile:

What’s this referring to? - {“redirect”: “https://www.example.com”, timeout: 1000}

1 Like

Should we be looking for the announcements? :slight_smile: or is it too small to mention?

Does anyone know why the redirection doesn’t work in mobile safari? I have several blocks on my page and I changed the nam with form2, here is my code

<script>
    window.addEventListener('submit-form-success-form1', (e) => {
        const response = e.detail.response || {};
        const data = response.data;
        if (data && data.redirect) {
            window.location.href = data.redirect;
        }
    });
</script>

<script>
    window.addEventListener('submit-form-success-form2', (e) => {
        const response = e.detail.response || {};
        const data = response.data;
        if (data && data.redirect) {
            window.location.href = data.redirect;
        }
    });
</script>

Thanks :sunflower:

EDIT : I understood that it didn’t work because my code was running in a modal, I did “open in same tab” and finally the code worked fine

You can also try this code, if you want to stay with a modal (though I’m not sure how everything is set up in your app)

<script>
    window.addEventListener('submit-form-success-form1', handleFormSuccess);
    window.addEventListener('submit-form-success-form2', handleFormSuccess);

    function handleFormSuccess(e) {
        const response = e.detail.response || {};
        const data = response.data;
        if (data && data.redirect) {
            window.parent.location.href = data.redirect;
        }
    }
</script>

1 Like

It is not working for me… is it working for anyone still?

Was working fine for me. I did the block update and from that point it stoped working…

Can someone please update the code for the new form block update ?

@Charle and @loysforget can you pls ping support via live chat so we can get example links and try and see what’s the issue ?

in the same case i use this code @artur posted earlier:

<script>
    window.addEventListener('submit-form-success-form1', (e) => {
        const response = e.detail.response || {};
        const data = response.data;
        if (data && data.redirect) {
            window.location.href = data.redirect;
        }
    });
</script>

and this confg for make:
image

but i have a few other forms in different pages that are not working (some are not using the default header)
may you help please?

Please DM to our support via Chat and we will need URLs and test user and try

hi @artur I want to redirect user after the api call button is clicked and succeed. How this step can be done?

1 Like

I’m curious about it as well!