Contact Form

From Foundation
Jump to navigation Jump to search

Foundation Contact Form

Foundation comes with secure working contact functionality, including a form validator. This feature in ready-made and available with minimal customization. See it working.

Set up

1. Choose the page you want to add your contact form to, and add to this page;


2. Open to edit extensions/Foundation/contact.php and modify to suit your email;

// an email address that will be in the From field of the email.
$from = 'Foundation contact form <>';

// an email address that will receive the email with the output of the form
$sendTo = 'Foundation contact form <>';

And the following to suit your wiki success and error pages.

else {
    //error redirect

3. Create the Success and Error pages on your wiki.

4. Move contact.php to your wiki root (same location as LocalSettings.php).

5. Test your form

Potential Problems

If you find the form doesn't work, it's probably because you've not set up SMTP for your wiki, in which case see here for information on how to do this.


Retrieved from ‘