Spice up Contact Form in Magento
Contact Form in Magento
The contact form in Magento is plain vanila that consists of name, email address and a comment textarea only. This is good for most stores, but if you want to use the Contact form for service detail enquiry or collect more data, the plain vanilla simply can’t cut it.
Spice up the Contact Form
You can add form elements such as drop-down menus, radio buttons, checkboxes and in this article we are going to show you just that.
First go to
to add a new template.Under the Load default template, choose the Contact Form from the drop-down menu in Template
Once the template loaded, you will see the plain vanilla code like so:
Name: {{var data.name}}
E-mail: {{var data.email}}
Telephone: {{var data.telephone}}
Comment: {{var data.comment}}
We can expand it by adding “dropdown”, “radio” and “checkbox” like so:
Name: {{var data.name}}
E-mail: {{var data.email}}
Website: {{var data.website}}
Telephone: {{var data.telephone}}
Which department you wish to contact: {{var data.dropdown}}
Are you a: {{var data.supplier}} {{var data.vendor}}
Which product types you wish to discuss?: {{var data.type}}
Comment: {{var data.comment}}
Now go to your Contact form file located at template/contacts/form.phtml to add the form codes.
Below codes are from our New Green Magento Premium Theme.
Are you a? Which product types you wish to discuss?
And the result:
3 Comments to “ Spice up Contact Form in Magento ”