Skip to content

Instantly share code, notes, and snippets.

@slischka
Created April 28, 2021 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slischka/46ed8e4d50edab8aa89f1d379cf9f187 to your computer and use it in GitHub Desktop.
Save slischka/46ed8e4d50edab8aa89f1d379cf9f187 to your computer and use it in GitHub Desktop.
Automatické vyplnění pomocí js
(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