Search…

X3 Photo Gallery Support Forums

Search…
 
tbp
Experienced
Topic Author
Posts: 42
Joined: 12 Apr 2020, 09:19

Contact Form: Name & email saved after sending

14 Apr 2020, 03:09

Hi Karl 

Today I noticed something strange in connection with the contact form: When I send a message, the name and email address is saved, but the message text is not. That means, if I open the contact form later on (even after closing the browser and deleting all temporary data) these two fiels are prefilled.
I tested this with different browsers (Chrome and Firefox). AutoFill is deactivated in both browsers and there are no cookies at all.

Do you have an explanation?

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

Re: Contact Form: Name & email saved after sending

14 Apr 2020, 04:32

Yes, this is expected behavior. Name and email is saved in BROWSER "localStorage" when visitors sends an email. Nowhere else. It's perfectly logical: If a visitor contacts you through the contact form, and then wants to send another message 5 minutes later (or 1 day later for that sake), they will want to use the same name and email. As for the message, that is NOT stored, because nobody will want to send the same message twice.
tbp wrote:(even after closing the browser and deleting all temporary data)
Not sure what you have deleted, but if you clear "cookies and site data", that is impossible.

In Chrome:
Image
Image
tpb wrote:I tested this with different browsers (Chrome and Firefox). AutoFill is deactivated in both browsers and there are no cookies at all.
It's not related to "autofill". As for "cookies", you are wrong. It's not exactly "cookies", but it's localStorage, which is mostly categorized under the same settings as "cookies" in modern browsers (see screenshots above).

If you had localStorage disabled (which would be a bad idea), you wouldn't see the fields getting populated. 100% guaranteed, because we don't fetch these values from server of course. Perhaps you are using a Cookie blocker of some sorts? That's all well, but cookie blockers are mostly meant to prevent websites from storing cookies that can be used from other websites. LocalStorage is more private, as a website can only access it's own localStorage data, and is therefore used for functionality in apps. X3 uses it a lot, because it makes your X3 website much faster.

You can even locate the stored values in your Browser. In Chrome, go to Developer Tools > Application > Click LocalStorage and click the website name, and you will see a list of items stored in your browser used by the website. It's entirely private of course, since the values are only available from the browser via Javascript.
Image
 
tbp
Experienced
Topic Author
Posts: 42
Joined: 12 Apr 2020, 09:19

Re: Contact Form: Name & email saved after sending

14 Apr 2020, 05:00

Wow, thanks for your quick reply. Your support here is outstanding!
In Chrome I only cleared "cached images and files", not "cookies and other site data". That's why I sill saw these values.
In can find both information in the local storage section within the Developer Tool.
 
tbp
Experienced
Topic Author
Posts: 42
Joined: 12 Apr 2020, 09:19

Re: Contact Form: Name & email saved after sending

28 Apr 2020, 11:50

Hi Karl,

Last question regarding the contact form: I activated the following section within the contact form:

<!-- Uncomment below section to include GDPR required email consent -->
<!--
<div>
<input type="checkbox" id="consent" name="consent" required>
<label for="consent">By using this form you agree with the handling of your data by this website.</label>
</div>
-->

I also added a link in the label text which works fine. But unfortunately there's no hovering on this link in contrast to the other links on my site. I guess I need some additional CSS and this is where I need your help  :innocent: I have the same effect on another page within a table, it think it's the same cause.

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

Re: Contact Form: Name & email saved after sending

28 Apr 2020, 20:09

That's because the special link-style in content is only applied to links inside <p></p> paragraph texts by default. The reason for this, is because this special style can break links which are used for other things (for example tabs, special navigation, lists, image-links etc), and we can't risk blindly applying this style for all links in your custom content.

To force the style, you can add "link-styles" class to the parent container element:
Code
<form data-abide class="contactform" class="link-styles">
You can all force link-styles for the entire content. Go to page context > CSS Classes, and type in "link-styles":
Image