Questions about contactform plugin
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Questions about contactform plugin
Many questions about plugins from me these days, I do hope I don't get on your nerves.
Also, I tend to look closely and see things like double exclamation marks and so on, please do not take that as complaining, just as reporting the behaviour - and I do not always know if actually the plugin is responsible for a particular behaviour, or the theme, or me.
My test installation, 2.01, Next theme:
http://efg-test.xf1.de/index.php?/pages ... tform.html
My contactform does display fields for name, e-mail, homepage and comment.
Name and comment are marked with a star, hence visibly mandatory - but e-mail seems mandatory too, but has no star.
However, the e-mail check behaves differently from the checks for name and comment: if I try to send a totally empty message, the message "fill out this field" (in German) appears next to the field name, while the screen scrolls up to that field (sadly, not to the label right above it, which gets cut off, so a user has to minimally scroll to see it).
Same if I put something into name only, then try to send -- "fill out this field" next to the comment field. However, after writing into that, and trying again to send, I get a red bar with: "Name, E-Mail und Nachricht dürfen nicht leer gelassen werden" ("...are not allowed to stay empty") no "fill out this field"-tooltip.
So, besides the fact that E-Mail does not have an asterisk, so the poor user has no chance to know it is mandatory, and besides the fact that the last error text calls for a text in Nachricht, whereas the field is actually labeled Kommentar instead of Nachricht: Why this difference in error handling?
Also, after successfully sending with the contactform, the form displays an empty (except an "ok-icon") green bar, like the blue bars on the form input page or the red "give-me-your-e-mail" bar. Other than those, which contain text, this bar has the text "your message has been sent!!" (yes, 2 exclamation marks) displayed below it, not inside the bar. Is this the intended behaviour?
And, is it intended that the page with this stuff (the one you see after successfully sending) also displays, above it, the full content of my static starting page? It is short in this test installation, but will become considerably longer.
Thanks for reading through this, thanks even more for helpful answers.
Regards,
Bernd
Also, I tend to look closely and see things like double exclamation marks and so on, please do not take that as complaining, just as reporting the behaviour - and I do not always know if actually the plugin is responsible for a particular behaviour, or the theme, or me.
My test installation, 2.01, Next theme:
http://efg-test.xf1.de/index.php?/pages ... tform.html
My contactform does display fields for name, e-mail, homepage and comment.
Name and comment are marked with a star, hence visibly mandatory - but e-mail seems mandatory too, but has no star.
However, the e-mail check behaves differently from the checks for name and comment: if I try to send a totally empty message, the message "fill out this field" (in German) appears next to the field name, while the screen scrolls up to that field (sadly, not to the label right above it, which gets cut off, so a user has to minimally scroll to see it).
Same if I put something into name only, then try to send -- "fill out this field" next to the comment field. However, after writing into that, and trying again to send, I get a red bar with: "Name, E-Mail und Nachricht dürfen nicht leer gelassen werden" ("...are not allowed to stay empty") no "fill out this field"-tooltip.
So, besides the fact that E-Mail does not have an asterisk, so the poor user has no chance to know it is mandatory, and besides the fact that the last error text calls for a text in Nachricht, whereas the field is actually labeled Kommentar instead of Nachricht: Why this difference in error handling?
Also, after successfully sending with the contactform, the form displays an empty (except an "ok-icon") green bar, like the blue bars on the form input page or the red "give-me-your-e-mail" bar. Other than those, which contain text, this bar has the text "your message has been sent!!" (yes, 2 exclamation marks) displayed below it, not inside the bar. Is this the intended behaviour?
And, is it intended that the page with this stuff (the one you see after successfully sending) also displays, above it, the full content of my static starting page? It is short in this test installation, but will become considerably longer.
Thanks for reading through this, thanks even more for helpful answers.
Regards,
Bernd
Re: Questions about contactform plugin
Judging from the markup, email is not a required field here. These are determined by the required fields set for comment forms in the spamblock plugin. (Yes, even if you don't use comments.)kybernator wrote:Name and comment are marked with a star, hence visibly mandatory - but e-mail seems mandatory too, but has no star.
These are browser-internal validations which in this case look if the required fields are empty.kybernator wrote:However, the e-mail check behaves differently from the checks for name and comment:
That, on the other hand, is a message generated by the contact form plugin. Do you have email set to be a required field in the spamblock plugin? Does the contact form send correctly if you enter an email address?kybernator wrote:However, after writing into that, and trying again to send, I get a red bar with: "Name, E-Mail und Nachricht dürfen nicht leer gelassen werden" ("...are not allowed to stay empty") no "fill out this field"-tooltip.
In order to avoid repetition and save resources, I guess. We always try to not duplicate functionality, so if something can be handled by code that already exists, use that. I think that's what's happening here with comments and contact form mails. Technically, a contact form mail is processed like a comment.kybernator wrote:besides the fact that the last error text calls for a text in Nachricht, whereas the field is actually labeled Kommentar instead of Nachricht: Why this difference in error handling?
It is probably a bug. Might be a typo in one of the .tpl files not closing an element correctly.kybernator wrote:Also, after successfully sending with the contactform, the form displays an empty (except an "ok-icon") green bar, like the blue bars on the form input page or the red "give-me-your-e-mail" bar. Other than those, which contain text, this bar has the text "your message has been sent!!" (yes, 2 exclamation marks) displayed below it, not inside the bar. Is this the intended behaviour?
I think I have seen this before, that the contact form behaves weirdly if a static pages is used as the starting page, but I can't remember why or how to solve that. It might be a question of which plugin is placed first in the event plugin list, static pages or contact form?kybernator wrote:And, is it intended that the page with this stuff (the one you see after successfully sending) also displays, above it, the full content of my static starting page? It is short in this test installation, but will become considerably longer.
YL
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Re: Questions about contactform plugin
Thanks for the long answer, I will look into that later - just a short feedback on the last item, the behaviour was indeed caused by the contact form plugin being placed after static pages - I reversed that order, and contactform now behaves as expected after sending in this regard, i.e. not including the startpage in its feedback. Good call!yellowled wrote:I think I have seen this before, that the contact form behaves weirdly if a static pages is used as the starting page, but I can't remember why or how to solve that. It might be a question of which plugin is placed first in the event plugin list, static pages or contact form?kybernator wrote:And, is it intended that the page with this stuff (the one you see after successfully sending) also displays, above it, the full content of my static starting page? It is short in this test installation, but will become considerably longer.
YL
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Re: Questions about contactform plugin
No. "Pflichtfelder" (mandatory fields) only includes name,comment - there seems to be no other settings in spamblock where this could be done, right?yellowled wrote:That, on the other hand, is a message generated by the contact form plugin. Do you have email set to be a required field in the spamblock plugin?kybernator wrote:However, after writing into that, and trying again to send, I get a red bar with: "Name, E-Mail und Nachricht dürfen nicht leer gelassen werden" ("...are not allowed to stay empty") no "fill out this field"-tooltip.
Yes.Does the contact form send correctly if you enter an email address?
(...)
OK, I see. Bug in the plugin itself, then, right? So I could kindly ask Garv to look into that, then. Where would the double exclamation mark hide in the files, do you think?It is probably a bug. Might be a typo in one of the .tpl files not closing an element correctly.kybernator wrote:Also, after successfully sending with the contactform, the form displays an empty (except an "ok-icon") green bar, like the blue bars on the form input page or the red "give-me-your-e-mail" bar. Other than those, which contain text, this bar has the text "your message has been sent!!" (yes, 2 exclamation marks) displayed below it, not inside the bar. Is this the intended behaviour?
Re: Questions about contactform plugin
That should be the one. Try adding email (not sure if that's how it's supposed to be entered in the plugin config) there. Personally, I think email as a required field makes sense for contact forms anyway – how else would you reply? Why would you send mail if you didn't want a reply?kybernator wrote:No. "Pflichtfelder" (mandatory fields) only includes name,comment - there seems to be no other settings in spamblock where this could be done, right?
It is pretty odd that it sends the email anyway, though. No idea why that is.
Not necessarily, it could just as well be a typo in the .tpl file for Next. I will check that out.kybernator wrote:Bug in the plugin itself, then, right? So I could kindly ask Garv to look into that, then. Where would the double exclamation mark hide in the files, do you think?
The double exclamation mark is probably just part of the lang constant that's used there. You know how some people on the interwebs think using multiple punctuation mark is a sign of emphasis? I assume it's that.
YL
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Re: Questions about contactform plugin
Dangerous ground, of course. Terry Pratchett wrote: "Five exclamation marks, the sure sign of an insane mind." - and we are already 40% thereyellowled wrote:The double exclamation mark is probably just part of the lang constant that's used there. You know how some people on the interwebs think using multiple punctuation mark is a sign of emphasis? I assume it's that.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Re: Questions about contactform plugin
It's astounding how much I have forgotten about various plugins. That text is not a lang constant (well, technically it is), you can edit it to your liking in the contact form plugin's options (and remove the extra exclamation mark there).yellowled wrote:The double exclamation mark is probably just part of the lang constant that's used there.
Not sure how the confirmation message gets screwed up, though. In my dev blog, it's displayed properly. Do you mind if I test that in your test blog?
YL
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Re: Questions about contactform plugin
D'oh!!yellowled wrote:It's astounding how much I have forgotten about various plugins. That text is not a lang constant (well, technically it is), you can edit it to your liking in the contact form plugin's options (and remove the extra exclamation mark there).yellowled wrote:The double exclamation mark is probably just part of the lang constant that's used there.
![Smile :-)](./images/smilies/icon_smile.gif)
Not at all, be my guest. Shall I send username/pw?Not sure how the confirmation message gets screwed up, though. In my dev blog, it's displayed properly. Do you mind if I test that in your test blog?
Re: Questions about contactform plugin
Nope, just ignore my test mail.kybernator wrote:Not at all, be my guest. Shall I send username/pw?
Questions:
1. Do you have a <p></p> wrapping your contact form confirmation text in the contact form options? If so, please remove it. Text only, it's not supposed to be wrapped in HTML.
2. If not, you probably still have a markup plugin activated which is wrapping the text in <p></p> here?
YL
Re: Questions about contactform plugin
The double EXMARK is in the lang constant. The lang constant is pasted into the second textarea field. This field is a html field. CKEDITOR on change or submit, will add <p> tags. I can't remember this field has changed from text to html at some point. 2k11 has the same behaviour. The origin tpl file was a div, which would include the p styled message, I assume. You may remove the p tags in sourcecode view and submit there. Then all is fine.
Edit: The funny thing is CKE plugin does spawn them both, while core CKE does not. Can't say why yet.
Edit: The funny thing is CKE plugin does spawn them both, while core CKE does not. Can't say why yet.
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Questions about contactform plugin
I seem to recall (from ProcessWire) that there is a setting in or a plugin for CKE which automagically wraps everything in <p> elements or replaces <div> with <p> or something like that? Some kind of p-related option in CKE. Maybe that is set in one, but not in the other?Timbalu wrote:The funny thing is CKE plugin does spawn them both, while core CKE does not. Can't say why yet.
YL
-
- Regular
- Posts: 135
- Joined: Sat Sep 22, 2012 10:15 pm
Re: Questions about contactform plugin
OK, the "message sent"-text was indeed displayed in CKEditor, and source code view showed that it had added p tags - I removed those, and the text appeared within the green bar.
Mystery solved, thank you.
Edit: Oh, and of course, the moment you configure anything in the plugin, the p tags are there again, unless you remove them manually.
Mystery solved, thank you.
Edit: Oh, and of course, the moment you configure anything in the plugin, the p tags are there again, unless you remove them manually.
Re: Questions about contactform plugin
Yes, this is what I meant with "submit there".kybernator wrote:Edit: Oh, and of course, the moment you configure anything in the plugin, the p tags are there again, unless you remove them manually.
You have misinterpreted my called "them". I meant both textareas (html) fields.yellowled wrote:I seem to recall (from ProcessWire) that there is a setting in or a plugin for CKE which automagically wraps everything in <p> elements or replaces <div> with <p> or something like that? Some kind of p-related option in CKE. Maybe that is set in one, but not in the other?Timbalu wrote:The funny thing is CKE plugin does spawn them both, while core CKE does not. Can't say why yet.
![Wink :wink:](./images/smilies/icon_wink.gif)
It is a "bug" in core wysiwyg initiation. I have described several times that we had three kinds of slight different textarea wysiwyg inits. The one for blog entries, the one for staticpages and other wysiwyg-hook related plugins and the one for other nugget plugins. The latter were called by the js function Spawnnugget() { /* init plugin nuggets when not using the default wysiwyg-editor */ ... correctly, in case of Plugin Editors.
For the contactform, well, this missing instance for the second textarea fields does not really matter, since the second textarea (for the success message) would probably not need a html editor in most cases and has this p issue with 2k11/next messages. But it be nice, if it would work correct here too and probably also for other multiple field nuggets (plugins).
I found an easy solution by setting nugget case spawnMulti to true and using the upper called Spawnnugget() js function not being initiated by core CKE instances. Any thoughts?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Questions about contactform plugin
Honestly, I just posted what came to my mind and seemed potentially related and/or helpful.Timbalu wrote:You have misinterpreted my called "them". I meant both textareas (html) fields.
![Smile :)](./images/smilies/icon_smile.gif)
Do we “have to” change the span to a div here (or everywhere where it's possible that the span could contain HTML? (It's not out of the question, just a little bit … <german>zähneknirschend</german>)Timbalu wrote:For the contactform, well, this missing instance for the second textarea fields does not really matter, since the second textarea (for the success message) would probably not need a html editor in most cases and has this p issue with 2k11/next messages.
I never fully understood the whole “spawn the WYSIWYG editor” part of out core JS, that's more onli's part. onli, thoughts?Timbalu wrote:I found an easy solution by setting nugget case spawnMulti to true and using the upper called Spawnnugget() js function not being initiated by core CKE instances. Any thoughts?
YL
Re: Questions about contactform plugin
Its not the span - its the p, which kicks that out.yellowled wrote:Do we “have to” change the span to a div here (or everywhere where it's possible that the span could contain HTML? (It's not out of the question, just a little bit … <german>zähneknirschend</german>)
Code: Select all
<p class="msg-success"><span class="icon-ok-circled" aria-hidden="true"></span> {$plugin_contactform_sent}</p>
Saying "have to" would mean to prevent innovation. I think 2k11 and next are examples of future themes. Fixing the cores second textarea would add that p tag in wysiwyg mode and most people would possibly never notice. I'd say: either change back to div, or use {$plugin_contactform_sent|replace:'<p>':''|replace:'</p>':''}
Or as a third possibillity use 'text' instead of 'html' for that field in contactform. Wouldn't there be a css only solution too?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian