Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1- add HTML/Liquid element inside the form, it must be inside the form.
- 2- Add this liquid code to the HTML/Liquid element:
- <style>
- .ckxrLb {display: none;}
- </style>
- {% if form.posted_successfully? %}
- <script>
- window.addEventListener('load', function() {
- function insertAfter(newNode, existingNode) {
- existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling);
- };
- const contactFormDOM = document.querySelector('.pf_contact_form > form')
- console.log(contactFormDOM.childNodes[0])
- if(contactFormDOM) {
- const pElements = contactFormDOM.querySelectorAll('p');
- const messageDOM = pElements[pElements.length - 1]
- insertAfter(messageDOM, contactFormDOM.lastElementChild)
- messageDOM.style.display = "block";
- }
- })
- </script>
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement