Contact Form icon

Contact Form

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.
Price option: Free

Supports Moodle 3.0-5.2 See all versions
Latest release: 2 months ago
Installations: 4867
Downloads (last 90 days): 760

Frankenstyle name: local_contact
Local plugins

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hi Anisorf, It's not you, it's me. You didn't miss anything. I did.
There was one spot in my code that resulted in people logged-in as guests as actually being logged-in. The issue has been resolved and the fix will be included in the next release of Contact Form just before the launch of Moodle 3.9 in June. HOWEVER, I would really appreciate it if you would download the latest version from https://github.com/michael-milette/moodle-local_contact, try it out and let me know if it resolves your problem. Thank you very much for bringing this issue to my attention.
By the way, since you have FilterCodes, you might be interested in trying out the - new {formsupport} tag or {formcontactus} tags (there are a few more) which were introduced in the November 2019 release. No need to mess around with HMTL. To use it, just add one of these FilterCode tags to a page on your site and you will get an instant form ready to be used. The resulting HTML it produces will be very similar code to that you found in the examples. If you need to customize the form, you can do so using the Moodle language pack editor included with Moodle.
Thank again for your question, Anisorf. I appreciate having the opportunity to fix that issue and look forward to hearing if this resolved your issue.
Best regards,
Michael
Hi @Michael Milette and all "Contuct Us" contributors.
Thanks for sharing this plugin with the community.
I'm having troubles on using the plugin with not authenticated user, it gives me " Invalid $user parameter in get_user_preferences() call". I've checked the configuration of the plugin and I have set Loggin required: false.
I use the classical template from README.md section Cutom Methods with reCaptha and I have FilterCodes plugin from which I use only {wwwroot}.
What am I missing?
Hi Paulo, I just noticed a bug in FilterCodes where it was identifying guest users as logged-in. If you have enabled guest access to your site, you may want to download the latest fixed version currently available on my GitHub site. The bug fix will be included in the next release of Filtercodes.
Thanks Michael Milette
Hi Paulo, It is definitely possible. Here is what you need to do:
1. Go to Site administration > Plugins > Authentication > Manage authentication
2. Scroll down to the Instructions field.
3. Insert your form in this field
4. Click Save Changes at the bottom of the page.
That's it! Your form will now appear in the section of the page called "Is this your first time here?" on the Moodle login page.
With that said, if what you really want is to have the ability to approve any registration requests on your site, you might be interested in taking a look at the "Email-based self-registration with admin confirmation" plugin. New users complete would then complete the self-registration process. However, before they can gain access to the site, a Moodle Administrator will receive an email and need to approve. I have used it on a couple of Moodle projects and it seem to work well. You can find the plugin by going to https://moodle.org/plugins/auth_emailadmin
Hope one of these solutions help!
Michael Milette
Is it possible to place the plugin on the login page? How?I need a "Contact us" for unregistered users.
Thanks
I copied and pasted the sample code into an html block of moodle and I think this error.
412 Error
Your request got filtered out due to possible security issues.
One or more things in your request were suspicious (defective request header, invalid cookies, bad parameters)
If you think you did nothing wrong:
•try again with a different browser
•avoid any evil characters inside the request url
If you are the owner of the website, you can consider revising the rules of the mod_security module or turning it off from your Web Hosting Control Panel.
Made the change as you described. It's working great. Thanks for your educational response.
Forgot one more thing. If you are trying to get the confirmation email that goes to the sender, although a lot of the code is there and it is even mentioned here and there in the documentation, it is incomplete and is therefore not enabled yet as documented in the README file under the heading Pending Features. Just never got around to finishing that feature.
Hi Michael, thanks for your question. In Moodle, you don't actually make changes in language files because they gets replaced when you upgrade. Moodle actually has a built-in language editor. It is in Site Administration > Language > Language Customization. The other reason that your changes didn't take effect is likely because you didn't clear the cache. Language strings in Moodle are cached and the language file never gets looked at again until you either change them using the language customization tool or your clear the cache. You can do this by going to Site Administration > Development > Purge Cache. This is just the way all of Moodle works. Hope this helps.
Best regards,
Michael
Thanks for sharing this plugin. I've installed it and everything seems to be working great. I'd like to change the confirmation message though, but can't seem to figure out how. I change it in the local_contact.php page inside your plugin, but that didn't do the trick. Any advice? Is there a setting I'm missing?
Michael, I'm just looking through your code and laughing out loud. I love your comments. "//Naughty naughty. We know all about your kind."
Hi Umer, unfortunately you can't. It's not made to work with the Moodle form API. It's made to enable people who don't know anything about programming but have a little knowledge of HTML to add webmail forms to their website. If you can copy and paste HTML or create an HTML form and want form submissions to be delivered to you by email, then this plugin is for you.
Any idea on how to use this plugin by making a form using Moodle form api
Hi Philip,
Thank you for your question. You can send the email from Contact Form for Moodle to multiple recipients by creating a mailing list (sometimes called a group mailing list). Then configure Contact Form to send the message to that mailing list's email address. See your email administrator or service provider for instructions on how to do this.