Thoughts from a small business Boise Drupal web developer.

Navigate!

Drupal Association Member

Firefox 3

Drupal 6 + Panels + Site Contact Form? YES!

For those of you who are trying to figure out how to place a contact form into a panels layout in Drupal 6.4+, I have found that the old method of:

<?php print contact_site_page(); ?>

was only producing a white screen of death. What DID work for placing a site contact form in both Panels and Lightbox2 was to use the PHP filter, and use the following:

<?php
&nbsp;&nbsp;require_once drupal_get_path('module', 'contact') .'/contact.pages.inc';
&
nbsp;&nbsp;print drupal_get_form('contact_mail_page');
?>

Hope it helps!

Comments

contact form & panels

Hi pad,
thanks for the code..
this snippet work, but the form is displayed out of the theme.. could you tell me why?

Cheers Kai

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about these filters

Refresco designed by Patrick Teglia

Powered by Drupal, an open source content management system