[support] D7 - Custom contact form - block

Ursula Pieper dramamezzo at gmail.com
Sun Jan 30 01:09:28 UTC 2011


Solve it:
In Drupal 7:

print drupal_render(drupal_get_form('contact_site_form'));

Works fine, now.

Ursula

On Sat, Jan 29, 2011 at 2:17 PM, Ursula Pieper <dramamezzo at gmail.com> wrote:
> I had created a custom contact form in Drupal 6, where I included a
> custom block on the page with the following php code:
>
> <?php
> if(!function_exists('contact_site_page')) {
>  include_once(drupal_get_path('module','contact').'/contact.pages.inc');
> }
> print drupal_get_form('contact_mail_page');
> ?>
>
> This works fine.
>
> I now try to do the same in Drupal 7, and customized the code as below:
>
> <?php
> if(!function_exists('contact_site_form')) {
>  include_once(drupal_get_path('module','contact').'/contact.pages.inc');
> }
> print drupal_get_form('contact_site_form');
> ?>
>
> The "contact_mail_page"
>
> I think I enabled all necessary modules / set permissions:
> admin/modules
> Enable Contact module
> Enable PHP filter module
>
> admin/people/permissions
> Enable Site wide contact form for all users
> Filter -> Allow PHP text format
>
> All I get as output is "Array", which means I am missing something
> here (I suspect strongly that the contents of that array, if it would
> get displayed, is exactly what I want).
> Any ideas?
>
> Thanks, Ursula
>


More information about the support mailing list