Created
August 20, 2013 17:44
-
-
Save makbeta/6284728 to your computer and use it in GitHub Desktop.
Drupal7: embed site contact form in the node template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//render site contact form on the contact-us page [put this code in your node.tpl.php where you want the form to appear] | |
if($node->nid == 4) { | |
require_once drupal_get_path('module', 'contact') .'/contact.pages.inc'; | |
$contact_form = drupal_get_form('contact_site_form'); | |
print drupal_render($contact_form); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment