I don't know about Javascript but I write a code to autofill form in this https://www.adidas.com/us/delivery site. That successfully fills the form, but when I tap on text input all text input fields go blank automatically.
Here's that strange behaviour Gif.
But I want that fields to remain fill, when I tap on that.
Here's the Javascript that I've used:
document.getElementsByName('shippingAddress.firstName')[0].value = 'Aafaq';
document.getElementsByName('shippingAddress.lastName')[0].value = 'Ahmed';
document.getElementsByName('shippingAddress.address1')[0].value = '553 Shinn Street';
document.getElementsByName('shippingAddress.city')[0].value = 'New York';
document.getElementsByName('shippingAddress.zipcode')[0].value = '10021';
document.getElementsByName('shippingAddress.phoneNumber')[0].value = '+1-202-555-0123';
document.getElementsByName('shippingAddress.emailAddress')[0].value = 'anymail@gmail.com';
I have to use this code with Swift iOS, can anyone tell me how I can solve this issue, and what is happening under the hood?
Any help would be appreciated.