SOLVED

Added custom JS and I’m no longer able to fill the Marketo forms in Android

Go to solution
Arun-P
Level 1

Added custom JS and I’m no longer able to fill the Marketo forms in Android

Hi team,

 

I am not able to type the textfield in Android phone by using Marketo form. And i have used the below code.

<script>
$( window ).resize(function() {
if ($(window).width() < 991) {$('#moveForm').appendTo('.form-resp-bot-element');}
if ($(window).width() > 991) {$('#moveForm').appendTo('.form-resp-bot-element');}
});
</script>

 

because of this it's causing the issue. If i removed this code it's working fine. Please help on this.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

Focusing a form input fires a resize event. You get caught in a loop where you’re moving the form over and over, each time losing focus.

 

You must check if the width has actually crossed over your breakpoint since the last resize. Don’t move the form if it’s already moved to the expected plance.

 

Also, the code currently on the page is throwing a fatal error, as you can see in the F12 Console (on both desktop and mobile).

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

It's simply not possible to help with this if we don't have a link to your page. Your code refers to elements that aren't even part of a Marketo form!
Arun-P
Level 1

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

Please find the test URL. Kindly check in Android device.

 

https://respond.apptio.com/01-Testing_Android_LP.html

SanfordWhiteman
Level 10 - Community Moderator

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

Focusing a form input fires a resize event. You get caught in a loop where you’re moving the form over and over, each time losing focus.

 

You must check if the width has actually crossed over your breakpoint since the last resize. Don’t move the form if it’s already moved to the expected plance.

 

Also, the code currently on the page is throwing a fatal error, as you can see in the F12 Console (on both desktop and mobile).

Arun-P
Level 1

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

Thank you for your response.

Only one time I m moving the form. I am having the issue only for text field drop down fields i m able to select the field. Just I need the cursor point to type the text field. This one is not happening. It comes and in a fraction of second it's disappear

SanfordWhiteman
Level 10 - Community Moderator

Re: Added custom JS and I’m no longer able to fill the Marketo forms in Android

I’ve explained the cause above.

 

You can easily see the event firing if you attach a debugger to the mobile browser. (You must know how to debug if you’re authoring client code.)