Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

what I am trying to do is to create a form with the Form API, so that users can post questions for a topic. The questions have to be moderated (publish / unpublish questions), so I decided to write my own module to handle that.

Following diverse tutorials and screencasts, I've created a hook_menu()-function and a form-function to define the form. All went well: I've got a page with the form in it.

The next step, I'd like to do, is to put that form into a node. I have a content type with a 'node reference'-field, where I want to include that form.

How can I solve this?

Tom

share|improve this question
Just a hint - have you evaluated existing moderation modules? – Mołot Jul 3 at 10:19
Yes, I have. The problem is, that a submission of a form isn't a node, so I can't use existint moderation modules, which bases are always nodes / content types. – Tom Jul 3 at 10:46
I meant - why to code own solution when you can just add moderation to regular nodes? Anyway, if your question really is Creating new content/node it should be closed as a duplicate. – Mołot Jul 3 at 10:49
Thanks for the quick reply Molot. I solved it by following the tutorial at drupal.org/node/335020 I added a <?php print drupal_render(drupal_get_form('xxx')); ?> in my tpl.php-file in my theme. – Tom Jul 3 at 10:53
So you wanted to print a form in page right ? Why dont you ask straight ? – Nikhil M Jul 4 at 4:41
show 1 more comment

closed as unclear what you're asking by Mołot, Triskelion, Nikhil M, Gisle Hannemyr, Chapabu Jul 4 at 8:26

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking.If this question can be reworded to fit the rules in the help center, please edit the question.