Transfer value from a field into popup with a form

  • 25 August 2021
  • 0 replies
  • 4 views

So i have a landing page that has email field and a button. Once you click on that button it brings the popup with a form. The popup appears if a button with certain class was clicked. Now i want to copy a value from that email field into the email field in the popup so users dont have to fill it twice.

Ive tried document.querySelector('.lp-convertable-page #email'); but it cant find it. Despite the element being there. If i inspect the email field and try document.querySelector('.lp-convertable-page #email'); again it works. Or if i unroll all the elements in Elements tab and find it manually first the js script works too. Any ideas? This is a really strange behaviour from the popups.

edit. looks like the reason is cause it’s in the iframe and it’s different domain than the page so it violates cors policy. Any ideas how to solve?


0 replies

Be the first to reply!

Reply