Re: Is there a way to put a contact form at the bottom of a page?
Posted: 17 Jan 2020, 05:23
Sorry, I forgot the contact form function is a jQuery specific plugin, so you would need to change to $(gallery.parentNode). I already tested it from here ... should work:
As for the warning, I remember now that we "cloned" a hidden contact form in the footer I believe? That's why you have duplicate ID's. Technically, ID's should be unique, but it's quite harmless ... If you want it solved, we would need to change to CLASS instead of using ID.
Code
function x3_load_page(){
var gallery = document.getElementsByClassName('gallery')[0];
if(gallery){
var form = document.getElementById('clone-form').cloneNode(true);
form.style.display = 'block';
gallery.parentNode.appendChild(form);
$(gallery.parentNode).applyContactForm(true);
}
}