Contact Form

General plugins (Local) ::: local_contact
Maintained by 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.
Latest release:
5461 sites
1k downloads
99 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.

Contact Form templates

If you are not familiar with HTML, consider using the following easy to use plain text {form...} tags included with the FilterCodes plugin. These will generate a Contact Form templates and therefore require that you have the FilterCodes plugin installed and activated.

  • {formquickquestion} : Adds a "quick question" form to your course. Form includes Subject and Message fields. Note: User must be logged in or the form will not be displayed.
  • {formcontactus} : Adds a "Contact Us" form to your site (example: in a page). Form includes Name, Email address, Subject and Message fields.
  • {formcourserequest} : Adds a "Course Request" form to your site (example: in a page). Unlike Moodle's request-a-course feature where you can request to create your own course, this tag allows users to request that a course they are interested in be created. Could also be used to request to take a course. Form includes Name, Email address, Course name, Course Description.
  • {formsupport} : Adds a "Support Request" form to your site (example: in a page). Form includes Name, Email address, pre-determined Subject, specific Subject, URL and Message fields.
  • {formcheckin} : Adds a "I'm here!" button to your to your course. Form does not include any other fields. Note: User must be logged in or the button will not be displayed.

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.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

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

Comments RSS

Comments

  • Georg Wiesinger
    Tue, 8 Aug 2017, 3:42 AM
    Hi Michael,

    everything is fine with the subject field! The German translation in AMOS for the required and optional fields (name, email, subject, message) has been changed, so after submitting the form the respective parameters are missing! Hence a multilingual usage of this plugin is not possible, the AMOS translations should be unified for the form fields concerned or maybe there is another approach to provide individual label translations...

    I edited the language file locally, no issues while using different languages anymore! smile

    Anyway, this plugin rocks!
  • Michael Milette
    Wed, 30 Aug 2017, 10:33 PM
    Hi Georg,

    Thanks for the feedback. I understand your concern. I have some ideas on how to address this and will try to implement a solution in the next release. In the meantime, instead of editing the language file locally, consider editing the language strings using Moodle's language tool. This approach will ensure that future updates of the plugin and the language packs don't override your string customisations. The tool actually looks and works in a very similar way to AMOS. You'll find it in your Moodle site by going to Site administration > Language> Language customization.

    Thanks again for the feedback. Hope this helps.
  • InsightKorea JobS
    Wed, 11 Oct 2017, 9:24 AM
    Hello. I like this. But can't use in Korean language. (Local tranlate not possible)
    Do you have a plan support UTF-8 type. (Korean language)
    Sorry about my English
  • Michael Milette
    Wed, 18 Oct 2017, 4:55 AM
    Hi LeeJH,

    I was not aware that it wasn't supporting UTF-8. I would like to work with you to better understand the issue to see if this can be resolved. For example, are you having trouble using Moodle string translation tool or that Contact Form can't send the email messages containing UTF8 text?

    Could you please use the Bug Tracker link on the Contact Form plugin page to open a new issue?

    Best regards,

    Michael
  • Georg Wiesinger
    Wed, 18 Oct 2017, 7:42 PM
    Hi Michael,

    I would like to ask if there is any update on the road with support for form-specific custom autoresponders and the like? This would be really terrific! smile

    Kind regrads,
    George
  • Michael Milette
    Tue, 24 Oct 2017, 10:58 PM
    Hi Georg, I am hoping to get the global autoresponder implemented in time for the upcoming release of Contact Form for Moodle in November/December 2017 however I am not sure that the "form specific" autoresponder will make it in on time. Keep an eye out on the the project's "dev" branch on GitHub to see the latest changes. If you want make sure you are personally notified when that feature does come out, add a "Feature Request" in the bug tracker. I will be sure to let you know when it becomes available. As always, if you want it sooner, I am available for hire wink

    Best regards,

    Michael
  • S I
    Fri, 27 Oct 2017, 5:48 PM
    Dear Michael Milette,
    thank you for this plugin, it is very useful. We are kindly asking for your support/help with a recent error, though.

    We have been using the local contact form plugin without any trouble for a while on our German client's moodle site.
    Strangely, somewhere after the latest two moodle updates, the contact form stopped working.

    The error message says: Forbidden. Unknown sender - invalid email address or the form field name is incorrect

    We read your troubleshooting page on git hub. But sadly, the description of this error is not very helpful to us.
    The e-mail is valid and we did not change the form field names. We double checked all plugin files comparing them to backups to see if anything changed- nothing.

    Everything else on the moodle site concerning e-mails works fine, still, it is just local contact form which seems to have a problem. We installed email test and it records no errors. We tried Debugging, but could not locate the issue.
    We use the standard php method in email settings of moodle. We briefly changed that on the moodle site to using smtp server settings to see if that helps and the email tests still work fine...but the contact form still produces the same error message Forbidden. Unknown sender - invalid email address or the form field name is incorrect

    What changed or what are we doing wrong? If you or anybody else on here has any ideas what we could try or tips for us, we'd greatly appreciate it.
    Thank you for your time.

    Best regards,
    Sue
  • Michael Milette
    Mon, 30 Oct 2017, 11:39 AM
    Hi Sue,

    Thank you for reporting this issue. I believe I might know the reason and have just published a new version of Contact Form for Moodle which should address your problem. However, you will need to make a few changes. The Name field must be called "name", Email field must be called "email". For consistency, the Subject field should be called "subject" and Message field called "message". The labels displayed in the email will still be taken from the language pack so these should display correct in German.

    What I suspect might have been happening is that someone updated the German translation in AMOS for the email fields. This affects anyone who was using the German language pack. Anyway, stick with the English names for these 4 fields and it should work again. By field name, I am referring to the input name="email" part of your form.

    Let me know if this resolves your problem. If it doesn't, please open an issue in the Bug Tracker (see link on the Contact Form plugin page) and I will be happy to work with you to resolve the issue.

    Best regards,

    Michael
  • Tariq Majeed
    Mon, 30 Oct 2017, 10:47 PM
    Need help.. getting this error after implementing the code and testing the form:

    Forbidden. Unknown sender - invalid email address or the form field name is incorrect.
  • Michael Milette
    Mon, 30 Oct 2017, 11:49 PM
    Hi Tariq, thank you for taking the time to ask your question.

    First, please ensure that you are using the latest version of Contact Form for Moodle. It was just updated yesterday.

    Next, take a look at the troubleshooting section of the Wiki for contact form. There is a section that addresses this very issue:
    https://github.com/michael-milette/moodle-local_contact/wiki/Troubleshooting#unknown-sender---invalid-email-address-or-the-form-field-name-is-incorrect

    Finally, if you are still having trouble, please open a ticket in the Bug Tracker. Be sure to include the HTML for your form. It formats best in the editor if your all of your HTML source code is indented by 4 spaces.

    Hope this helps.

    Best regards,

    Michael
  • S I
    Wed, 1 Nov 2017, 9:01 PM
    Hello again Michael!

    First, my colleague Katja and me would like to thank you very much for your swift reply and support, we spent hours trying to figure out what's wrong and your explanation solved the problem within minutes. smile
    For your information, after we received your message, we did the following:

    - update the plugin with the brand new version you provided

    - changed the class name in the action of the form, which was apparently the only difference in the plugin form compared to our old version:
    before:
    to now:

    And...it works again, hurray. ;)

    PS, in case this info is important:
    We checked again and the mandatory form fields were and are still in English language (name, email, subject, message …), but my colleague found that it might have indeed been a problem with us only using the German language pack. We also have additional form fields which still work fine as well now, just in case that's helpful info to anyone.

    What we cannot say for sure is when exactly the plugin stopped working, it might have been one or two moodle updates ago.

    So, if any other German moodle site users run into this problem, your helpful comment and update did the trick for us.
    Thank you again and have a great day!

    Best regards, Sue
  • Michael Milette
    Sun, 5 Nov 2017, 4:36 PM
    Thank you for your feedback Sue!

    Glad to hear that it is now working for you. I truly believe the bugs fixed included in the update did the trick. The class name is simply there so that you can style your form using CSS. You could actually call it using any valid class name or leave the class name out completely.

    Upgrading to this latest version is actually recommended for anyone using non-English language packs, not just German.

    Best regards,

    Michael
  • Michael Milette
    Sat, 11 Nov 2017, 3:35 PM
    Great news! The latest release if Contact Form for Moodle is now available on Moodle.org. Besides being compatible with Moodle 3.0 to 3.4, ReCAPTCHA is now also supported for users who are either not logged-in or logged-in as guest. Users who are logged-in as regular users will not see the ReCAPTCHA. To make it work, you will need to also install the FilterCodes plugin in order to add a {recaptcha} tag into your form. See the documentation for more information.

    Enjoy!

    Michael Milette
  • Georg Wiesinger
    Mon, 13 Nov 2017, 10:02 PM
    Hi Michael,

    many thanks for supporting reCaptcha in combination with your FilterCodes plugin, it's really awesome! I already tested it and it basically works like a charm! There is only one thing I noticed: The reCaptcha code generated by the FilterCode plugin is using http prefix, so on fully encrypted Moodle instances the reCaptcha won't appear as it will be blocked by browsers due to security reasons.

    Kind regards,
    George
  • 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 Moodle.org. 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,
    Michael
Please login to post comments