Moodle plugins directory: Contact Form | Moodle.org
Contact Form
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..
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!
Anyway, this plugin rocks!
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.
Do you have a plan support UTF-8 type. (Korean language)
Sorry about my English
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
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!
Kind regrads,
George
Best regards,
Michael
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
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
Forbidden. Unknown sender - invalid email address or the form field name is incorrect.
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
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.
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
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
Enjoy!
Michael Milette
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
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.
Kind regards,
Michael