Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Best Practices For Adding A Contact Form

edited January 2014 in Framework

In respect to staying out of the core framework/cms, do I need to create a new app for this? It seems like overkill for a simple email form. I don't want to install the forms app, and I want a url like Is creating an app/contact the best solution?


  • The forms app is probably the easiest way to build a contact form, but if you just want one form you would have to setup an app for it. Keep in mind, a single script is still a valid app, it's just the way things are kept organized (encouraging people to section their own code into apps instead of adding to an existing app).

    I did this on a site recently, so I just cleaned that code up and put it online here:

    This creates a contact form that you can drop into your site navigation and will appear at the URL /contact.

  • Great, thanks. Found a bug because of this. I develop on WAMP, and the directory separator is ; instead of : on line 30 of lib/Mailer.php. I changed it to:

    //ini_set ('include_path', ini_get ('include_path') . ':lib/vendor');
    ini_set ('include_path', ini_get ('include_path') . PATH_SEPARATOR . 'lib/vendor');

    I imagine this could be an issue in other locations, too.

  • Good catch! I just patched that file and grepped for other instances of setting the include_path so I think it should be fixed across the board now.

Sign In or Register to comment.