General plugins (Local): Contact Form

Maintained by Picture of Michael MiletteMichael 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.
1945 sites
42 fans
Current versions available: 1

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. If you are not familiar with HTML, consider using the {form...} tags included with the FilterCodes plugin. You are just one plain text tag closer to having a common webform than you think.

The initial work for this project was sponsored by the kind folk at l'Action ontarienne contre la violence aux femmes. Contact Form benefits from ongoing development by 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
    Thu, Jun 18, 2020, 8:12 PM
    Hi Balazs, thank you for asking your question again. I did see your other message in my notifications but I think the site must have deleted it due to the source code because I could not find it anywhere.

    This issue has nothing to do with Contact form. Contact form is the form processor (i.e. only after you submit a form). At the stage where your form is being displayed, Contact Form is not yet involved.

    Based on what I could see in your previous screenshot, it looks like Static Pages doesn't like the carriage returns in the middle of an HTML tag. You could try removing them and let me know how it goes. For further assistance with this issue, please report using the Bug Tracker link on the Contact Form plugin page.
  • Picture of Pedro Perez
    Sat, Jun 20, 2020, 11:39 AM
    Hi Michael,

    Is it possible to use it to send to an external email and customize the names of the fields?
  • Picture of Michael Milette
    Sat, Jun 20, 2020, 12:42 PM
    Hi Pedro,

    Yes to both of your questions.

    External email address: There is an example in the file under Optional Contact Form For Moodle Settings. Same idea except that you can just specify one name in a hidden field instead of using a dropdown list. You will still need to configure the email address in the plug-in's settings.

    Labels for the fields: You can name the labels for the fields to anything you want in the HTML form.

    Field names: You can use any field names you want. For multi-word field names, separate the words using underscores.

    For the mandatory fields: You can rename these by customizing the language strings.

    For more details on all of this, see the documentation found in the file included with the plugin.

    Best Regards,

  • Picture of Balazs DaVinci
    Mon, Jun 22, 2020, 5:14 PM
    Hallo Michael,

    thanks a lot for your answer. I have found one "solution" for my issue with the contact form (using it without Filter codes).
    It seems that the filter codes are not working properly within "local_staticpage". I realized that, when I saw, that actually sending the form goes wrong because calling
    the index.php does NOT succeed via "{wwwroot}/local/contact/index.php". When I change this to "/local/contact/index.php", then it works.
    Then I am not using the Filter code {wwwroot} and just give the correct path directly.

    Best Regards

  • Picture of Michael Milette
    Mon, Jun 22, 2020, 10:20 PM
    Hello Balazs, is it just {wwwroot} or are none of the FilterCode tags working?
  • Picture of Denis K
    Tue, Aug 4, 2020, 7:56 PM
    Please help, you need to make the field from the form the subject of the message. Thanks.
  • Picture of Michael Milette
    Wed, Aug 5, 2020, 1:25 AM
    Hi Denis,

    That is indeed what it does. However, if you are using Moodle in a different language, you may need to make some changes to the sample forms as the field names are language specific. For more information, please consult the file included with the plugin or the "More documentation on this plugin" link found on the plugin's page on for more help, please post your questions in the discussion forum - link also on the plugin's page.

    Best regards,

  • Picture of Maryam Behandish
    Mon, Sep 14, 2020, 1:40 AM
    Hello. I've put up everything as suggested. But once the send button is pressed, an error occurs saying sess key is missing. Can someone help please? Thanks.
  • A Coloradian who was sucked into facebook against his wishes
    Mon, Sep 14, 2020, 2:12 AM
    I would like to show a link, not the entire form, on the front page. I tried saving the html "contract us" form as a static page, but that did not work. I could link to the page, but it would not accept input.
  • Picture of cyber sec
    Tue, Sep 15, 2020, 12:46 AM
    Keep getting this error: Forbidden. "sesskey" field is missing or contains an incorrect value.
  • Picture of Michael Milette
    Tue, Sep 15, 2020, 7:45 PM
    The answer to the sesskey question is included in the documentation. See:

    For additional help, please submit your questions to:
    Discussion forums:

    To report a bug, please submit your support request to:
    Issue tracker:

    For faster paid support, please contact me through my website at:

    Best regards,

  • Picture of cyber sec
    Wed, Sep 16, 2020, 11:44 PM
    I am still having sesskey issues. I am fairly sure the /local/contact/index.php file is being found. The problem is not with the "form action" line. This might be a bug.
  • Picture of Ekaggata Technologies
    Thu, Sep 17, 2020, 4:45 PM
    Hi - Will it work with Moodle 3.9? I installed but i cant see the text box field to type anything.
  • Picture of Michael Milette
    Mon, Sep 21, 2020, 3:50 AM
    Hi cyber sec, I highly doubt it is a bug. This plugin is used on almost 2000 sites around the world. If sesskey was actually an issue, it would affect everyone. Please see my comment from September 15, 2020.
  • Picture of Michael Milette
    Mon, Sep 21, 2020, 3:55 AM
    Hi Ekkaggata Technologies. It is indeed compatible with Moodle 3.9 and will be indicated as such shortly. I am not sure what text box field you are expecting to see. This is a form processor, not a form builder. Please read the documentation on how to create a form and then ask any questions you might have in the discussion forum. Links to both of these are included in the Useful Links section of the Contact Form plugin page.

    Best regards,

1 2 3 4 5 6 7
Please login to post comments