I need to add
contact form in the front page but I don't know how. there are some modules like Contact Form On Node that inserts this form in the node page but I only want it to be in the front page. how do I can do this ?
The general solution using
Step 1: Go to your webform and click on edit. Step 2: Then go to the tab 'Webform'.
Step 3: At the top of the webform menu click on 'Form settings'.
Step 4: Go all the way to the bottom and click on 'Advanced Settings'.
Step 5: Make sure you click on the checkbox that says 'Available as block'.
Step 6: Go to /admin/structure/block. You can either hover over the 'Configure' link or click on the click to see the block id. It will look something like this 'client-block-341'.
Step 7: Use this snippet code to put into the template file you want to output the webform.
This is the source of this solution.
First you have to install contact module inbuilt in drupal 7.
You Need to follow this refference link to install contact module:
Now you have to create one either block or node to showing contact form.
contact form to a node,
==== OR ====
contact form to a block
1). Open template.php in your theme folder and add the following code. Replace [THEME NAME] with the name of your theme. Replace the value of $module and $delta with the actual string values.
Hint: To locate these values go to admin/structure/block and click on the "configure" link next to the block you want to print. The strings will be shown in the URL as such: admin/structure/block/manage/[module]/[delta]/configure.
2). Clear all caches.