4

I have created a form in hubspot.

In IOS devices like iPhone and iPad after successful post of form with the HTTP 204 response, page is redirected to action url, but in windows and android it remains in same page.

Is there any way we can avoid form redirection in iPhone/iPad?

Abhishek
  • 1,999
  • 5
  • 26
  • 52

1 Answers1

0

I had the same issue, and found no info regarding how to solve it for iOS devices (any browser).

So I've inserted a jquery to scroll down when the url parameters have the string submissionGuid - parameter present in all hubspot form submissions.

  1. Add an ID or Class to the section where you display your inline message. i.e. id="AREA_INLINE_MSG"

  2. Insert the following code when the page is ready:


if (window.location.toString().indexOf("submissionGuid") != -1) {
    $("html, body").animate({
        scrollTop: $("#AREA_INLINE_MSG").offset().top + 3000
    }, 1000);
}

Note: I've added 3000 pixels to the window position to scroll down a little bit more.

rphv
  • 5,409
  • 3
  • 29
  • 47