{"id":24223,"date":"2012-09-28T04:53:41","date_gmt":"2012-09-28T08:53:41","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=24223"},"modified":"2016-02-24T03:27:02","modified_gmt":"2016-02-24T08:27:02","slug":"drupal-7-how-to-setup-contact-form-and-manage-contact-details","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/drupal-7-how-to-setup-contact-form-and-manage-contact-details.html","title":{"rendered":"Drupal 7. How to setup Contact Form and manage contact details"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p> This tutorial is going to  show you how to add a contact form to your Drupal template, change the email  address and edit the form fields. <\/p>\r\n<h3>How to  add  the contact form?<\/h3>\r\n<ol>\r\n<li>In your Drupal admin go to menu <strong>Modules<\/strong> \u2013 and enable the one called <strong>Contact<\/strong>7.7 (Enables the use of both  personal and site-wide contact forms). Check it and click <strong>Save Configuration<\/strong> at the bottom. <\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_1-300x54.jpg\" alt=\"\" title=\"drupal_cform_1\" width=\"300\" height=\"54\" class=\"alignnone size-medium wp-image-24224\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_1-300x54.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_1-150x27.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_1.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>Make sure that under the <strong>Modules<\/strong> menu -&gt; <strong>Panels <\/strong>all  these modules are enabled:<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_2-300x127.jpg\" alt=\"\" title=\"drupal_cform_2\" width=\"300\" height=\"127\" class=\"alignnone size-medium wp-image-24225\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_2-300x127.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_2-150x63.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_2.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>Go to menu <strong>Structure -&gt; Pages <\/strong><\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_3-300x137.jpg\" alt=\"\" title=\"drupal_cform_3\" width=\"300\" height=\"137\" class=\"alignnone size-medium wp-image-24226\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_3-300x137.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_3-150x68.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_3.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>Click on <strong>Import Page<\/strong><\/li>\r\n<li><strong>Page  name<\/strong><strong> <\/strong>should be <strong>Contacts <\/strong><\/li>\r\n<li><strong>Path<\/strong><strong> <\/strong>should be <strong>contacts<\/strong><\/li>\r\n<li><strong>Allow overwrite of an existing page<\/strong> should be checked.<\/li>\r\n<li>To<strong> Paste page code here <\/strong>add the following:<\/li>\r\n<pre class=\"brush:php\">\r\n$page = new stdClass();\r\n$page->disabled = FALSE; \/* Edit this to true to make a default page disabled initially *\/\r\n$page->api_version = 1;\r\n$page->name = 'contacts';\r\n$page->task = 'page';\r\n$page->admin_title = 'Contacts';\r\n$page->admin_description = '';\r\n$page->path = 'contacts';\r\n$page->access = array();\r\n$page->menu = array();\r\n$page->arguments = array();\r\n$page->conf = array(\r\n  'admin_paths' => FALSE,\r\n);\r\n$page->default_handlers = array();\r\n$handler = new stdClass();\r\n$handler->disabled = FALSE; \/* Edit this to true to make a default handler disabled initially *\/\r\n$handler->api_version = 1;\r\n$handler->name = 'page_contacts_panel_context';\r\n$handler->task = 'page';\r\n$handler->subtask = 'contacts';\r\n$handler->handler = 'panel_context';\r\n$handler->weight = 0;\r\n$handler->conf = array(\r\n  'title' => 'Panel',\r\n  'no_blocks' => 0,\r\n  'pipeline' => 'standard',\r\n  'css_id' => 'contacts',\r\n  'css' => '',\r\n  'contexts' => array(),\r\n  'relationships' => array(),\r\n);\r\n$display = new panels_display();\r\n$display->layout = 'flexible:two_columns';\r\n$display->layout_settings = array();\r\n$display->panel_settings = array(\r\n  'style_settings' => array(\r\n    'default' => NULL,\r\n    'center' => NULL,\r\n    'column_right' => NULL,\r\n    'second_column' => NULL,\r\n  ),\r\n);\r\n$display->cache = array();\r\n$display->title = '';\r\n$display->content = array();\r\n$display->panels = array();\r\n  $pane = new stdClass();\r\n  $pane->pid = 'new-1';\r\n  $pane->panel = 'center';\r\n  $pane->type = 'contact';\r\n  $pane->subtype = 'contact';\r\n  $pane->shown = TRUE;\r\n  $pane->access = array();\r\n  $pane->configuration = array(\r\n    'override_title' => 0,\r\n    'override_title_text' => '',\r\n  );\r\n  $pane->cache = array();\r\n  $pane->style = array(\r\n    'settings' => NULL,\r\n  );\r\n  $pane->css = array();\r\n  $pane->extras = array();\r\n  $pane->position = 0;\r\n  $pane->locks = '';\r\n  $display->content['new-1'] = $pane;\r\n  $display->panels['center'][0] = 'new-1';\r\n  $pane = new stdClass();\r\n  $pane->pid = 'new-2';\r\n  $pane->panel = 'second_column';\r\n  $pane->type = 'block';\r\n  $pane->subtype = 'block-1';\r\n  $pane->shown = TRUE;\r\n  $pane->access = array();\r\n  $pane->configuration = array(\r\n    'override_title' => 1,\r\n    'override_title_text' => 'Our Location',\r\n  );\r\n  $pane->cache = array();\r\n  $pane->style = array(\r\n    'settings' => NULL,\r\n  );\r\n  $pane->css = array();\r\n  $pane->extras = array();\r\n  $pane->position = 0;\r\n  $pane->locks = array();\r\n  $display->content['new-2'] = $pane;\r\n  $display->panels['second_column'][0] = 'new-2';\r\n$display->hide_title = PANELS_TITLE_NONE;\r\n$display->title_pane = 'new-1';\r\n$handler->conf['display'] = $display;\r\n<\/pre>\r\n<li>Click <strong>Import<\/strong> at the bottom. <\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_4-300x171.jpg\" alt=\"\" title=\"drupal_cform_4\" width=\"300\" height=\"171\" class=\"alignnone size-medium wp-image-24227\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_4-300x171.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_4-150x85.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_4.jpg 978w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>On the next page, click <strong>Save<\/strong> at the bottom.<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_5-300x195.jpg\" alt=\"\" title=\"drupal_cform_5\" width=\"300\" height=\"195\" class=\"alignnone size-medium wp-image-24228\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_5-300x195.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_5-150x97.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_5.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>On the same page, where it says <strong>Menu<\/strong> No menu entry under <strong>Summary,<\/strong> click <strong>edit<\/strong> to add a menu tab pointed to your contact page.<\/li>\r\n<li>Now you can open the front page of  your site and click the Contacts menu to see the page with the form you have  just created.<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_6.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_6-251x300.jpg\" alt=\"\" title=\"drupal_cform_6\" width=\"251\" height=\"300\" class=\"alignnone size-medium wp-image-24229\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_6-251x300.jpg 251w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_6-125x150.jpg 125w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_6.jpg 468w\" sizes=\"(max-width: 251px) 100vw, 251px\" \/><\/a><\/p>\r\n<li>You can always go back to page  settings under Structure -&gt; Panels -&gt; Contacs -&gt; edit.<\/li>\r\n<\/ol>\r\n<h3>How to  change the contact form email address?<\/h3>\r\n<p>To activate  the form\/to change the email address go to you <strong>Structure -&gt; Contacts Form<\/strong> menu -&gt; edit. Click <strong>Save<\/strong> at the bottom to save the changes. <\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_7.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_7-300x126.jpg\" alt=\"\" title=\"drupal_cform_7\" width=\"300\" height=\"126\" class=\"alignnone size-medium wp-image-24230\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_7-300x126.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_7-150x63.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_7.jpg 994w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>How to  change the contact form fields?<\/p>\r\n<p>To change  the fields that your contacts form comes with: <\/p>\r\n<p><strong>Your name *<\/strong>  <\/p>\r\n<p><strong>Your e-mail address *<\/strong><\/p>\r\n<p>\r\n  <strong>Subject *<\/strong><\/p>\r\n<p>\r\n  <strong>Message *<\/strong><\/p>\r\n<p><strong>Send yourself a copy.<\/strong>  <\/p>\r\n<p><strong>Send message<\/strong>  <\/p>\r\n<p>you need to  edit the corresponding lines in the <strong>contact.pages.inc<\/strong> located in the<strong>\\modules\\contact<\/strong> folder:<\/p>\r\n<p> <strong>&#8216;#title&#8217; =&gt; t(&#8216;Your name&#8217;),<\/strong>  <\/p>\r\n<p><strong>&#8216;#title&#8217; =&gt; t(&#8216;Your e-mail address&#8217;),<\/strong><\/p>\r\n<p>\r\n  <strong>&#8216;#title&#8217; =&gt; t(&#8216;Subject&#8217;),<\/strong>  <\/p>\r\n<p><strong>&#8216;#title&#8217; =&gt; t(&#8216;Message&#8217;),<\/strong><\/p>\r\n<p>\r\n  <strong>&#8216;#title&#8217; =&gt; t(&#8216;Send yourself a copy.&#8217;),<\/strong><\/p>\r\n<p>\r\n  <strong>&#8216;#value&#8217; =&gt; t(&#8216;Send message&#8217;)<\/strong>  <\/p>\r\n<p>The title  &ldquo;Contact&rdquo;  can be changed in your Drupal  admin panel under the menu <strong>Structure  -&gt; Pages -&gt;  <\/strong><strong>Contacts  -&gt; (left menu) Settings -&gt; Basic -&gt; <\/strong><strong>Administrative title <\/strong>.<\/p>\r\n<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_8.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_8-300x198.jpg\" alt=\"\" title=\"drupal_cform_8\" width=\"300\" height=\"198\" class=\"alignnone size-medium wp-image-24231\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_8-300x198.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_8-150x99.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/09\/drupal_cform_8.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"\/help\/files\/Drupal\/contact_form_drupal.htm\" target=\"blank\">Drupal 7. How to setup Contact Form and manage contact details<\/a><\/p>\r\n<\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u00a0This tutorial is going to  show you how to add a contact form to your Drupal template, change the email  address and edit the form fields.  <\/p>\n","protected":false},"author":30,"featured_media":24233,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[723],"tags":[497,593,793,1366],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/24223"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=24223"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/24223\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/24233"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=24223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=24223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=24223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}