Avoid redirecting form to 204 response in ios browsers

I created a form in hubspot.

On iOS devices such as iPhone and iPad, after successfully publishing the HTTP 204 form, the page is redirected to the action URL, but on Windows and Android it remains on the same page.

Is there any way to avoid form redirectionthe iPhone / iPad?

+4
source share
1 answer

I had the same problem and did not find information on how to solve it for iOS devices (any browser).

So, I inserted jquery to scroll down when url parameters have a string submissionGuid- a parameter that is present in all views of the hubspot form.

  • , . .. id="AREA_INLINE_MSG"

  • , :


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

: 3000 , .

0

Source: https://habr.com/ru/post/1598216/


All Articles