General plugins (Local): Contact Form

Maintained by Picture of Michael Milette Michael Milette
Contact Form is a Moodle plugin that allows your site to process and send information submitted through HTML web forms to the site's support email address or primary administrator if the support email address is not defined.
317 sites
18 fans

The Contact Form plugin for Moodle processes information submitted through a custom web form, sending it by email to the site's support email address, if defined, or to the primary system administrator.

Examples uses for this plugin include:

  • Contact us form.
  • Support request form.
  • Request a course form.
  • Information request form.
  • Lead generation form.
  • Membership application form.
Share with us how you use this plugin on your site.

Note: This is not a web form builder but a form processor. You must have some knowledge of how to create HTML forms or at the very least be able to cut and paste the example included in the README file.

The initial work for this project was sponsored by the kind folk at l'Action ontarienne contre la violence aux femmes and TNG Consulting Inc..

Potential privacy issues

Reminder: Email message protocols may cross the Internet and store messages on mail servers in unencrypted plain text. If you are sending messages outside of your local area network, it is highly recommended that you do not use this plugin to collect sensitive information such as social insurance or credit card numbers. It has nothing to do with this plugin's functionality but just with the way email protocols work. This plugin on its own does not store any information - anywhere.


Screenshot #0
Screenshot #1
Screenshot #2


Picture of Michael Milette
Michael Milette (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Michael Milette
    Mon, 13 Nov 2017, 11:45 PM
    Hi George,

    You are most welcome. I am always grateful to hear when find my work useful.

    Thank you for bringing the https issue with the ReCAPTCHA to my attention. This functionality is actually part of the FilterCodes plugin. I have corrected the issue and uploaded a an updated version to You'll need to update the FilterCodes plugin. No change is required of the Contact Form for Moodle plugin.

    Feel free to let me know if it gives you anymore grief. It is feedback like yours that makes me a better developer. smile

    Kind regards,
  • Picture of Georg Wiesinger
    Tue, 14 Nov 2017, 6:21 AM
    Hi Michael,

    it still doesn't work for me, tested with Safari, Chrome, Firefox and Opera Browser! reCAPTCHA is still loaded via http.

    Kind regards,
  • Picture of Michael Milette
    Tue, 14 Nov 2017, 10:32 AM
    Sorry for the inconvenience George, my bad. Forgot to actually return the https status in one of my functions. I really do appreciate your sticking with it though as it should be all fixed up now. Please upgrade to the latest FilterCodes. --Michael
  • Picture of Georg Wiesinger
    Tue, 14 Nov 2017, 3:54 PM
    Good morning Michael,

    no problem at all! Everything is working flawlessly right now! smile Many thanks for all your effort!

    Kind regards,
  • Picture of Alisa Lokshin
    Fri, 9 Mar 2018, 1:18 AM

    I've read the plugin documentation, which says that the outgoing message from the contact form can be modified by editing the language files. Do you know what specific string should be edited in the language files? I looked, and was unable to figure it out.

    The email message we receive from the form currently includes information about the "Recaptcha challenge field" and "Recaptcha response field," both of which we would like to hide.


  • Picture of Jazmín Jiménez Bedolla
    Fri, 9 Mar 2018, 1:54 AM

    I'm using the contact form, however when I send the message, always it is sent from admin's email.

    I don't know what happens.

    I appreciate the help

  • Picture of Michael Milette
    Fri, 9 Mar 2018, 10:54 AM
    Hello Alisa, please report the issue using the Bug Tracker link on Contact Form plugin page. I will be happy to look into removing the recaptcha field information from the email.

    As for the language strings, the documentation is incorrect. Sorry for any confusion. It will update it in the next release coming in April/May. The correct way to modify strings in Moodle is to use the language editor by clicking Home > Site Administration > Language > Language Customization. Next select the language you wish to modify, click Open Language Pack for Editing, select the local_contact.php and click the Show Strings button. For more information on using the language editor, see .
  • Picture of Michael Milette
    Fri, 9 Mar 2018, 10:57 AM
    Hello Jazmin, you are indeed correct. That is the way Moodle works and for good reason.

    First, realize that the email really is being sent from the Moodle site and not the individual filling out the form. So it kind of makes sense.

    If you prefer that the email be sent from a no-reply address, you need to specify the no-reply address in the Moodle settings (same page as SMTP settings). In fact, this is no longer an option in more recent versions of Moodle.

    If you click reply, you may notice that the message to field is now populated with the senders email address and not the administrators email address. This is because we make use of an email standard feature called the "reply-to" email address.

    Why do we do it that way? Because, if properly and securely configured, your email SMTP server should never accepting email submissions from the outside world. If it did, anyone could use it to send spam and other malicious emails to everyone else on the Internet. Before you know it, your mail server would end up blacklisted and would no longer be able to deliver most, if any, emails at all.

    If you want to discuss this further, I invite you to continue the conversation using the Discussion link on the Contact Form plugin page. If you believe this is a bug, please report the issue using the Bug Tracker link on Contact Form plugin page.
  • Picture of Michael Milette
    Fri, 9 Mar 2018, 1:46 PM
    Hi Jazmin, another possibility is that you are testing your form while logged into Moodle as an administrator. If you are logged in, the name and email address fields are ignored and the Moodle account information is used instead.

    Best regards,

  • Picture of Michael Milette
    Fri, 9 Mar 2018, 1:50 PM
    Hi Alisa, ignore the request to add a bug report for the recaptcha fields. I had already fixed this in the next release of the plugin which will be coming out in April/May 2018. If you want to try it out ahead of time, feel free to download the DEV branch which you will find using the Source Control URL link on the plugin's page. If you still have problems with the latest DEV version, let me know by creating an issue in the Issue Tracker I mentioned previously.

    Best regards,

  • Picture of Alisa Lokshin
    Sat, 10 Mar 2018, 5:30 AM
    Thanks, Michael! I will look into testing the DEV branch.

  • Picture of David Heuring
    Thu, 29 Mar 2018, 8:13 PM
    I have recently upgraded to Moodle 3.4.2+ because the new recaptchaV2 update is included in that version. The one-tick challenge box appears on the new user sign up page so I know it is working correctly. Looks and works great, by the way! However, the recaptcha version in the Contact Form is still the old V1, which is about to lose Google support at the end of the month. I'm wondering why the Contact Form isn't showing recaptchaV2. Everything is set up correctly but it still shows the text-based recaptchaV1. I've unenabled and then enabled recaptcha in the settings but that didn't make a difference. Is this maybe related to the filtercodes plugin and how that works with recaptcha? Any ideas?
  • Picture of Michael Milette
    Fri, 30 Mar 2018, 10:55 PM
    Hi David, thanks for letting me know. I had just assumed that the existing function calls would be updated for v2 but I guess I was wrong. Sorry about that.

    An updated version of the Contact Form for Moodle plugin as well as the FilterCodes plugin should be available later today (Friday March 30th, 2018 EDT.). The new versions will automatically use reCAPTCHA v2 as of Moodle 3.1.11+, 3.2.8+, 3.3.5+, 3.4.5+ and of course 3.5+ when it is release.

    I've finished the required fixes and am testing it right now to make sure it all works. IMPORTANT: You will need to update both of these plugins.

    If you have any problems with the reCAPTCHA, please submit an issue in the Bug Tracker. A link is available for each of the plugin's Bug Tracker on

    Best regards,

  • Picture of Aurelien DARIE
    Sun, 1 Apr 2018, 2:38 AM
    Dear Michael,
    Merci/Thanks for this plugin, however no email being sent. I have tried all your recommendations, emails are being sent via eMail test. Furthermore no error is showing. Does SMTP need to be set in order to the emails to be sent ?
  • Picture of Michael Milette
    Mon, 2 Apr 2018, 10:59 PM
    Hi Aurelien,

    If emails are being sent via eMail Test, then Contact Form for Moodle should work as well. They both use the same method to send message in Moodle so there should not be any need to configure or change your SMTP settings. I suspect that your form may not be configured properly. To learn more about the issue, take a look at the Troubleshooting section of the plugin's Wiki at:

    If you need more help or would like to continue the conversation, please post your message in the Discussion Forum. You'll find a link to it on the Contact Form for Moodle plugin page on

    Best regards,

    Michael Milette
1 2 3 4
Please login to post comments