sfContactFormPlugin - 1.0.6

A basic contact form

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source


The plugin is simple and usual to websites.

I use some plugins in symfony and I know how those plugins accelerate the proccess developing a website. This is my first plugin. So I tried to do something easy and usual.

To use the plugin you need install the Swift Mailer library at http://swiftmailer.org . After downloaded the Swift package, you must extract it in lib/vendor/swift folder of your project. Insallation:


$ php symfony plugin:install --stability=beta sfContactFormPlugin

enable the plugin in project_name/config/ProjectConfiguration.class.php


enable the plugin module in your project app like this frontend/config/settings.yml

    enabled_modules:        [contact]

make the rout of contact in your project app in this way frontend/config/routing.yml

  url:  /contact
  param: { module: contact, action: index }

configure the addressee and messages in your project app in this way frontend/config/app.yml

    ## Put here your email address. This email will receive the message from contact form
    email:         your_email@server.com         
    ## custom your error message            
    error:        There is an error. Cannot be sent!  
    ## custom your success message
    notice:       Your message has been sent succefull 
    ## captcha error message
    captcha:      Your secret code is incorrect
    ## put here the absolute image path
    ## example: http://localhost/yourproject/web/index.php/contact/image
    image_path:   http://localhost/yourproject/web/index.php/contact/image
    ## legend your form
    legend:       Please, fill the fields and send us a message  
    ## change fields labels
    field_name:     Your Name
    field_email:    Your Email
    field_subject:  Your Subject
    field_message:  Your Message
    field_captcha:  Security Code
    button:         Send Message

clear the cache

$ php symfony cc

publishing the plugin

$ php symfony plugin:publish-assets



Online test:


To do:

You can open the contact module of plugin and customize it as you need.

  • There isn't implemented the multi dispatch