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!

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

Thanks! great!

Thanks! great!

Nice one!

Thanks for this. On my site I had to delete the "&nbsp;&nbsp;" in both lines.

Once in the panel, the contact form extended into the sidebar so I've got to figure out how to force it to be fluid or shrink in size. If you've any info on how to do that, that'd be cool. If I figure it out I'll post back.

Powered by Drupal, an open source content management system