Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

How to customize Joomla default contact form

Submitted by on June 15, 2009 – 3:35 am13 Comments

How toIt is surprising to me that there are actually not much solution on this problem when I am searching over the Internet recently. When using Joomla, you may want to customize some fields in the Joomla default contact form but not to the extent of installing another contact form plugin. For example, you may want to have the form’s subject field to pre-load the text, ‘Customer Enquirers’ when the page was loaded.

I will illustrate how you can do it in this post.

Actually there is only one thing you need to know to solve this problem – identify which file to amend. The file that you need to change is located at: components/com_contact/views/contact/tmpl/default_form.php

Just change the codes in there depending on what you want and upload it to the server for it to be effective. You should be familiar with HTML and PHP (optional) for you to change it with ease.

13 Comments »

  • cypher says:

    This is exactly what I did (I came across your post later on).

  • ludia_newbee says:

    Aleksey , ok i ve customized the default_form.php, it was easy :)) my problem is that, when i click “send” the form , the customized new fields arent send with the default fields to the email address receiver! I mean that the only fields that joomla sends to email are the old ones, but the new i ve made arent going anywhere! how can i drug to my mail receiver all the fields from the form, and not only “name, email, subject, text” ??? can you help me?

    thank you

  • romero says:

    thank you.. i was searching for a solution… :)

  • This is not working for Joomla version Joomla_1.5.20. Several times I have changed the “default_form.php” file under “component/com_contact/views/tmpl/” folder, but couldn’t see any changes. I’m screwed up several days with this problem. Please help me.

  • powerplay says:

    you can customise the look of the contact form by adjusting the CSS in the template. The following will add some space between the input boxes:

    textarea#contact_text{
    margin-bottom: 10px
    }

    input#contact_subject{
    margin-bottom: 10px
    }

    input#contact_email{
    margin-bottom: 10px
    }

    input#contact_name{
    margin-bottom: 10px
    }

  • This is exactly what i was after.. tnx

  • didim says:

    thanks this is very usefull, l will try shortly.

  • KL says:

    THis is great…thanks!!!

  • saeed says:

    i need help i want to add three contact fields on every page of my website which is built on joomla how can this be done help would be appreciated. thanks

  • Hedi says:

    I want to change the font color from black to white of this contact form because my background color is black.

    I edit this file
    components/com_contact/views/contact/tmpl/default_form.php

    and add

    after and before
    but nothing happens..

    Please kindly advice, what went wrong, and how am i suppose to change it?
    FYI I’m newbie

  • darek says:

    thanks !

  • someOne says:

    i like to know how to modify this php so the mail can be send only to the predefinited addres.

  • Just a advice!
    when you insert new fields, you will need to add these fields at the database mysql!

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.