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:
3165 sites
1k downloads
55 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.

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

Show comments
  • Fri, Jan 15, 2021, 4:03 AM
    Okay, I figured out what I left out in sendmail.php. Not sure why I saved the file like that, but it was obvious when I took a look. Seems to be working now. Thank you.
  • Sat, Jan 16, 2021, 2:40 AM
    You are very welcome Blair and cyber sec. Have a great weekend!
  • Sun, Feb 14, 2021, 5:21 AM
    Gmail works as an outbound mail server in Moodle, but not with this plugin.

    I have created a mydomain@gmail.com account to use for outbound email on Moodle. This works on Moodle, I have ran the outbound mail test, and I have tested student self registration. I have done these tests multiple times, it always works.

    But it does not work when using this plugin. I have put echo statements in sendmail.php to make sure that sendmail.php is being called correctly, and that all the information is correct. But the message is never sent to the mydomain@gmail.com account.
    <?php
    $email=$_POST['email'];
    echo "email $email";
    $subject=$_POST['subject'];
    echo "subject $subject";
    $message=$_POST['message'];
    echo "message $message";
    mail("mydomain@gmail.com", $email ,$subject, $message);
    ?>
  • Sun, Feb 14, 2021, 6:11 AM
    If you want help, please move this discussion to the discussion forum. https://moodle.org/mod/forum/discuss.php?d=352851
  • Fri, Apr 2, 2021, 5:34 AM
    Hi,
    After installing this plugin to our Moodle version 3.0+ using PHP 5.4, I am not able to go back to site administration. I got the following error

    JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

    Is there a way to resolve this? The clients do not want to upgrade their Moodle version.

    Thank you
  • Sun, Apr 4, 2021, 10:16 PM
    Hi RA, I am not sure why Contact Form would cause this problem as it does not use json. However I have seen this problem when running older versions of Moodle on Windows but it is unrelated to the plugin. If you think it is related, you could simply delete the /local/contact directory.
  • Thu, Apr 15, 2021, 12:54 AM
    Thank you, Michael. I think it's the php version that we used (5.4). I ended up deleted the plugin from the server and everything worked.
  • Sat, May 8, 2021, 5:44 AM
    Hi
    I have the plugin working great as a contact form but have also modified some fields in a second form to look similar to a booking form by changing the html and rather than having to type dates in have used some date pickers in the format dd-mm-yyyy, this also works well but despite everything on site being in english (en), the output in the sent email is in yyyy-mm-dd us format, is there anyway to edit/change the output to match the input ?

    Secondly I have seen it in th wiki pages and these comments that the confirmation message can be changed but not can't see how / where to do that, can ou point me in the right direction to change the message ?

    Many Thanks for any help.
    Steve
  • Sun, May 9, 2021, 8:19 AM
    Hi Steve,

    Please ask your questions in the discussion forum. A link called "Discussion" is provided on the plugin's page.

    For the date format of the date returned by the HTML date picker, it cannot be changed. It is actually an ISO standard format. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

    The confirmation title, errors and messages are Moodle language strings. Like most strings in Moodle, you can modify it using the Moodle Language editor. Look for the strings associated with the local_contact plugin. For more information on using the language editor, see "Language customisation - MoodleDocs" https://docs.moodle.org/en/Language_customisation

    Again, please use the discussion forum for any further questions.

    Best regards,

    Michael
  • Mon, May 10, 2021, 6:10 PM
    Hi Michael

    Sorry if I posted in the wrong place, I just thought that since other questions had been asked here and it was directly related to this pluging that this was the best place to post any problems, again sorry for that.

    I understand that the html code defacto is in the yyyy-mm-dd format but as in the link you posted the output is in uk format as 22/07/2018. On our website on the form it shows dd/mm/yyyy and thought it is something that might have been able to change within the plugin for the displayed output but if that is not the case I understand and will have to live with that.

    On the message, I did have a look at the customisation prior to posting but didn't come across it so must have been using the wrong search strings or in the wrong place I guess and will have another look into that one.

    Having said all that I appreciate the help you have given, many thanks for that.

    Regards
    Steve

  • Tue, May 11, 2021, 11:41 PM
    No worries Steve. Hope you found the information useful. Advantages of posting in the forums is that you can get answers from more people who may come up with ideas I haven't even thought of. People also post screenshots which can be helpful to understand instructions. Anyway, I appreciate your comments and will include instructions on how to customize these strings in a future release of Contact for Moodle.
  • Wed, May 12, 2021, 3:15 AM
    Hi Michael

    Yes found the info most useful and helpful, after revisiting the language customisation again managed to find the string and changed the wording as required.

    We will have to live with the yyyy/mm/dd date format as the form works very well for our needs and hope the users remember to book the dates correctly when the email comes through the system.

    Again Many Thanks for the help.
    Regards
    Steve
  • Wed, Jun 2, 2021, 4:48 PM
    I have implemented Contact Form in Moodle 3.9. It was easy to install and set up and is working well. The only problem is that emails are only being sent if the person using the form has administrator access to Moodle. For teachers, students, guests and non-logged-in users everything appears to work but the email never arrives. I am at a loss as to where to look and I suspect it may be related to some other setting outside Contact Form. Any suggestions?
  • Wed, Jun 2, 2021, 8:49 PM
    Hi Charles, thank you for your feedback. I am actually grateful for your comments. You see, I recently experienced the same issue with the Multi-Factor Authentication plugin. Emails were delivered correctly for admin accounts but not for teacher account. I didn't investigate further but didn't realize that it might also happening with Contact Form. I will definitely look into it and figure it out now that I know the issue is affecting more than one plugin including my own.

    If you or anyone else would like to be notified about updates on this issue, please leave a comment on the following ticket:
    https://github.com/michael-milette/moodle-local_contact/issues/62
  • Wed, Jun 2, 2021, 9:19 PM
    I just ran some tests and determined that emails are sent regardless of whether the user is logged-in or not. I will continue to investigate but will only post updates to https://github.com/michael-milette/moodle-local_contact/issues/62 .
1 2 3 4 5 6 7 8
Please login to post comments