Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Is there a way to put a contact form at the bottom of a page?

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:
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);
  }
}
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.
 
User avatar
ulfklose
Experienced
Topic Author
Posts: 48
Joined: 10 Dec 2019, 09:10

Re: Is there a way to put a contact form at the bottom of a page?

17 Jan 2020, 08:57

Now the form works, but the sender address is *** @ flamepix.com. This is not a big issue for me but if that's changeable I would prefer to do so.

Yes, we cloned a hidden contact form in the footer. But isn't it supposed to appear only once per page? I searched through the generated source code and can only find one appearance of the string in question. As long as this isn't causing any further problems we could stick to the IDs I guess.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Is there a way to put a contact form at the bottom of a page?

17 Jan 2020, 09:20

ulfklose wrote:Now the form works, but the sender address is @ flamepix.com. This is not a big issue for me but if that's changeable I would prefer to do so.
There are THREE different emails when correctly sending from online forms: 1. Recipient (you), 2. Reply-to (the email of the person who fills the form, and the email used when recipient "replies" to the email), and 3. From (the email that is the legitimate sender of the email on behalf of the server and SMTP). It's critical that the FROM email is legitimate, valid and allowed to send on behalf of the server and the SMTP service. This way, emails will have high reputation, and will not get sorted as spam. Flamepix uses postmarkapp.com to send emails, and for this to work correctly, we need to use a validated email with SPF and DMARC records assigned to the domain DNS. We could perhaps setup one of YOUR emails as sender, but that requires some configuration (as above), and it doesn't really make much difference ... If you REPLY to a visitor who sent you an email from the contact form, they will see FROM you ... It's only the email that comes from the website to you which is FROM *** @ flamepix.com, which is technically correct. I would recommend ignoring it.
ulfklose wrote:Yes, we cloned a hidden contact form in the footer. But isn't it supposed to appear only once per page? I searched through the generated source code and can only find one appearance of the string in question. As long as this isn't causing any further problems we could stick to the IDs I guess.
Not quite sure where you are searching. When using javascript to clone an element, you won't find it in the original page source. We added the original form into the footer, hidden, and then we clone it on demand below the gallery. It's not a problem ... It's just formally "wrong" to have multiple elements share the same ID.

Since I have access to your website, would you like for me to fix it? Should take less than 10 min.
 
User avatar
ulfklose
Experienced
Topic Author
Posts: 48
Joined: 10 Dec 2019, 09:10

Re: Is there a way to put a contact form at the bottom of a page?

17 Jan 2020, 10:48

That would be awesome, yes, please fix it. 
 
 
User avatar
ulfklose
Experienced
Topic Author
Posts: 48
Joined: 10 Dec 2019, 09:10

Re: Is there a way to put a contact form at the bottom of a page?

17 Jan 2020, 11:15

Awesome, thank you. I received your test message.