justb3a Posted November 11, 2014 Share Posted November 11, 2014 (edited) Just a simple contact form including spam protection.Optional support for Twig (TemplateTwigReplace) as template engine. --- Please have a look at the readme on github!If you upgrade from version 0.0.9 and below, there are some extra steps to be taken. The Guides Installation Module Settings Spam Protection Usage Logging Upgrade Notes Edited April 22, 2016 by justb3a Added the "module" tag and removed it from title. 27 Link to comment Share on other sites More sharing options...
pwired Posted November 11, 2014 Share Posted November 11, 2014 Every day more talented forum members. Thanks for this module. Link to comment Share on other sites More sharing options...
felix Posted November 11, 2014 Share Posted November 11, 2014 This is great. I thought about doing a contact form module myself as i would have needed it in nearly every single project we've done recently. Btw: I like that all of your modules support TemplateTwigReplace! Link to comment Share on other sites More sharing options...
owzim Posted November 17, 2014 Share Posted November 17, 2014 Looks great, have to try it out soon. Thanks for your contribution. Link to comment Share on other sites More sharing options...
benbyf Posted November 18, 2014 Share Posted November 18, 2014 Amazing! I've been mostly doing this functionality in my templates as far as I haven't needed any save functionality but I will be defiantly be checking this out when i do. Link to comment Share on other sites More sharing options...
justb3a Posted November 18, 2014 Author Share Posted November 18, 2014 Little update: I added one more spam protection: antiSpamCountAdditionalInputs - Number of additional inputs. Spam bots often send more than the number of available fields.Thanks for your feedback Link to comment Share on other sites More sharing options...
dazzyweb Posted November 18, 2014 Share Posted November 18, 2014 Very nice.. just tryed it out and works perfectly. I had a little trouble with ajax but sorted out in the end. My fault for copy and pasting from the instructions but this code below needs to be changed: if ($('.js-simplecontactform').length) { $.simplecontactform($('.js-simplecontactform')); } to if ($('.js-simple_contact_form').length) { $.simplecontactform($('.js-simple_contact_form')); } just a matter of class name if using the default class of the form in simple_contact_form.php 2 Link to comment Share on other sites More sharing options...
justb3a Posted November 18, 2014 Author Share Posted November 18, 2014 @dazzyweb thanks for pointing that out! I wanted to answer your message but you solved it too fast Link to comment Share on other sites More sharing options...
nyo08 Posted November 20, 2014 Share Posted November 20, 2014 Hello, I was glad to find this module, cause that was just what I looked for.. but I upload the module and when I Install it, I have an error : Method Modules::getInstall does not exist or is not callable in this context But If I go back in the module page, It seems well installed (I have access to the settings), but when I call the form in my template, an error appears : Error Exception: Method Modules::getInstall does not exist or is not callable in this context (in /home/www/d7a3bc5db5bed31cde906ac7976f3d83/web/wire/core/Wire.php line 231) Any ideas ? Maybe I skipped a step... I'm not a Master in PW, but I globally understand how it works.. Thanks in advance. Link to comment Share on other sites More sharing options...
justb3a Posted November 20, 2014 Author Share Posted November 20, 2014 Hi @nyo08, which version of ProcessWire are you using? I found a similar error and changed my code as explained. Please clone the module (github) and checkout hotfix/2.4-dependency and try again. And please let me know if everything works as expected. I tested it (ProcessWire 2.5.3) without any problems. git clone git@github.com:justonestep/processwire-simplecontactform.git SimpleContactForm cd SimpleContactForm git checkout hotfix/2.4-dependency Link to comment Share on other sites More sharing options...
nyo08 Posted November 26, 2014 Share Posted November 26, 2014 Hi @nyo08, which version of ProcessWire are you using? I found a similar error and changed my code as explained. Please clone the module (github) and checkout hotfix/2.4-dependency and try again. And please let me know if everything works as expected. I tested it (ProcessWire 2.5.3) without any problems. git clone git@github.com:justonestep/processwire-simplecontactform.git SimpleContactForm cd SimpleContactForm git checkout hotfix/2.4-dependency Indeed I update my PW (I had the 2.2.4 version... looks like I miss some update ahah) and that's perfecly work Link to comment Share on other sites More sharing options...
makari Posted December 5, 2014 Share Posted December 5, 2014 This module seems to be great. Is there any option to set the Labeltext for the Inputfields? Link to comment Share on other sites More sharing options...
horst Posted December 6, 2014 Share Posted December 6, 2014 It would be great if the wireMail function could be used for sending emails instead of the php mail function. This way people would be able to use it together with their favourite mail extensions. For example with SMTP support: wiremail-swiftmailer or wiremailsmtp 5 Link to comment Share on other sites More sharing options...
justb3a Posted December 9, 2014 Author Share Posted December 9, 2014 @makari: This module creates a simple template, you can / should change the html structure as well as the label texts. If you need multi language support you have to change the text like this echo __("the label text here!"). Now you can translate the labels via Processwire Backend. @horst: Thats a good point but first I have to finish another project. I will keep it in mind – as some other things (I did not forget your message ). 2 Link to comment Share on other sites More sharing options...
Maverick Posted January 10, 2015 Share Posted January 10, 2015 Hey there, I've installed this module. It has created a new template simple_contact_form.php I've created a page and used simple_contact_form.php as its template So I see the contact form on the new page, but it doesn't seem to work (I've used my @gmail.com as emailTo) is there anything else I should do to make it work? Link to comment Share on other sites More sharing options...
cstevensjr Posted January 10, 2015 Share Posted January 10, 2015 but it doesn't seem to work (I've used my @gmail.com as emailTo) Gmail doesn't allow you to send an email from yourself to yourself, unlike other email platforms. The message gets sent but you don't receive the copy, since if's from yourself. Link to comment Share on other sites More sharing options...
Maverick Posted January 10, 2015 Share Posted January 10, 2015 I didn't try to send an e-mail to myself? I have sent @gmail e-mail in the module settings and was testing it on the site using another e-mail, but nothing much happens there.. Link to comment Share on other sites More sharing options...
cstevensjr Posted January 10, 2015 Share Posted January 10, 2015 Ok, then I would then look at the php mail function on your server. I believe this module doesn't make use of enhanced PW capabilities for email sending. It would be great if the wireMail function could be used for sending emails instead of the php mail function. This way people would be able to use it together with their favourite mail extensions. For example with SMTP support: wiremail-swiftmailer or wiremailsmtp Link to comment Share on other sites More sharing options...
justb3a Posted January 22, 2015 Author Share Posted January 22, 2015 The module uses now the WireMail function instead of php mail. Besides I added the tag "scf" for fields and templates created by this module (just available on a new installation). 5 Link to comment Share on other sites More sharing options...
cstevensjr Posted January 22, 2015 Share Posted January 22, 2015 Very good, Thanks for making this enhancement! Link to comment Share on other sites More sharing options...
BrettMW Posted March 2, 2015 Share Posted March 2, 2015 Hi, Just experienced a couple of bugs with this module which happen when the save messages setting is off. SimpleContactForm.module First bug: if (!$this->pages->findOne('name=' . $this->pageName) instanceof Pages) { I believe this should be without the "!" at the start as it is currently the wrong way around. Removing it fixed it for me. Next bug: } elseif (!in_array($currentIp, $excludeIps)) { This line should also check if the saveMessages setting is on, i.e.: } elseif (!in_array($currentIp, $excludeIps) && $this->saveMessages) { I haven't tested any of these with other settings and I'm not sure they are correct - just needs some looking into. 1 Link to comment Share on other sites More sharing options...
pwired Posted March 5, 2015 Share Posted March 5, 2015 (edited) Hi, Is the simple contact form working with multi-language setup ? If not, what do I have to do on the contact form templates ? http://modules.processwire.com/modules/simple-contact-form/ Edited March 5, 2015 by kongondo Hi pwired. Move your question here (SCF's support board). Link to comment Share on other sites More sharing options...
justb3a Posted March 5, 2015 Author Share Posted March 5, 2015 @pwired: @makari: This module creates a simple template, you can / should change the html structure as well as the label texts. If you need multi language support you have to change the text like this echo __("the label text here!"). Now you can translate the labels via Processwire Backend. @BrettMW: Indeed, I only tested this at the beginning with save message settings deactivated. Thanks for your feedback, I will test and implement this as soon as possible. Link to comment Share on other sites More sharing options...
justb3a Posted March 9, 2015 Author Share Posted March 9, 2015 New version 0.0.9 includes fixes for deactivated save message setting. On line :343 I removed the exclamation mark (!) and I corrected the instance to compare with. This has to be Page instead of Pages because findOne returns a single page (because of this double bug the messages has been stored). I included a second check here just to make sure that save messages is on. I also included this additional check on line :396. 3 Link to comment Share on other sites More sharing options...
justb3a Posted March 24, 2015 Author Share Posted March 24, 2015 New version 0.1.0 adds some more spam protection possibilities and logging. CSRF validation mark messages as spam (by mail or/and ip address) logging for received messages and spam sort option for repeater items in backend to get the latest to the beginning of the list For more information have a look at the readme. NOTICE: If you upgrade an existing installation from 0.0.9 and below to the current version, there are some steps to be taken. 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now