Created
April 28, 2021 11:17
-
-
Save slischka/46ed8e4d50edab8aa89f1d379cf9f187 to your computer and use it in GitHub Desktop.
Automatické vyplnění pomocí js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
document.addEventListener('fapiFormMounted', function (e) { | |
const fapiForm = e.detail.formWrapper; | |
const email = fapiForm.querySelector('input[name=email]'); | |
setTimeout(() => { | |
email.disabled = true; | |
email.value = 'jirka@fapi.cz'; | |
email.dispatchEvent(new Event('blur', { bubbles: true })); | |
}, 1000) | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment