3

I'm trying to add a formspring-like page to my website. This looks like an easy task for Drupal 7: create a new content type, create a new view to list the questions and answers, add another view to the backend to view the unanswered questions, and you're ready to go.

But I have one remaining problem: how can I add a simple form to ask a new question? I want to have a simple form on top of the list-page, with just 1 input box where a visitor can ask his question and a submit button.

I've already found the "form block"-module, but I can't trim the output of the form to just 1 input box. Is there an off-the-shelf solution, or do I have to create a custom module/block that programmatically creates a new node?

1

the only way I can see this being possible, would be creating a custom node/add page for your content (see How can I theme the template for edit or add a node for a specific content type?) and then using Panels to create a custom page with your node on top and then your view directly below.

I would be interested to know if anyone else has any better/easier suggestions of course. +1 for question :)

  • also note that submitting the form from the add part of page would redirect you to that content, so you would need a way of overriding this. – David Craig Dec 28 '11 at 13:15
  • Thank you for the answer. As no one seems to have a better solution, I'm accepting yours. – wlcrs Dec 29 '11 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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