How can show a form that is created with the drupal _hook form api, on a specific content type? So, as example:

I created new content for the content type 'outside' when I click on save I see the content type like this:

  • Titel
  • Date
  • Description

What I want is a form below this. I created one with a _hook form and it is working an saves data to my database but I have no idea, how can I show them on the same page as my content. It may not show on the content type 'inside'! Now it's a other page the link is /outside-form and only the form shows up there, no content type.

How can I get them below my content on every page that has the content type 'outside'? I have written a own module, but only this is not working/showing up on specific content(type).

Can someone explain it to me?

  • please explain more in detail what you're trying to achieve. If you want a separate form, you can add it to the node form page using the block system.
    – Ollie
    Commented Mar 22, 2014 at 12:16
  • You may use the Webform module for this.
    – Roni Gal
    Commented Mar 22, 2014 at 12:40

1 Answer 1


You need to create a block that's content contains following code:

$form = drupal_get_form('YOUR_FORM_ID');
print drupal_render($form);

Set the block visiblity only on content type 'outside' & place this block in any region as per your suits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.