0

I want to be able to allow users to rate businesses on various factors such as staff helpfulness and quality of clothing. I've been told that the best way to create the content type for the review form would be through the use of integer fields. I have now set up that content type, but am not really sure how to allow users to view/submit the review.

When I create content with the type "review," all that is displayed to the user is a comment section. They cannot see any of the selectable fields created in the content type, let alone submit them, because no values were defined by myself when the content was created. How would I go about making a displayed version of the form, with the menus exposed (in a similar fashion to exposed filters in Views, I suppose).

After the displayed form is created, I need a way to allow it to be submitted. Obviously, the review form would be useless if the information can't be submitted into the database to be later displayed in the reviewed business's page.

EDIT: A suggestion below suggests using webform, but as far as a I can tell, there is not a way to display the results of the form within another node. So, although webform presents a way to submit reviews and for me to see the results, there is no way to display them without manually inputting the average ratings into the nodes that the reviews are related to.

1

Normally, the way you implement this is you create a Content type Review, but you don't actually create the node (an instance of the content type, "1 review") yourself as an administrator. Instead, you give the users permissions to create nodes of that content type.

In this case, then, there isn't one review per restaurant. Each user creates a review for each restaurant that they would like to review, and then you can use the Views module to display all the different reviews. This will give you a model like the product reviews on Amazon.com, where each product often has a number of reviews from different users.

  • Oh, I think I understand. So then if a user wanted to review the business, I would place a "review this business" link on the page, which would then allow the user to create a node of content type Review. The user would then save the node, and the review would be associated with their individual account since they created the node? Then use the entity reference field to have them link their review "node" to the business they are reviewing, and use another module to grab the information to display in the business page? – Mrweiner May 5 '12 at 20:37
  • Yes, since the user will be the author you don't need to do anything special to associate them with their reviews. You will need a way to associate the review with the business reviewed, and entity reference is one way to do that. You can then use the Views module (possibly in conjunction with Panels) to display everything. – Patrick Kenny May 6 '12 at 0:49
1

I recommend checking out the Webform module. It seems like the best way to handle this type of functionality.

  • I actually found that soon after posting the question. It seems to be do what I am looking for. Now, to figure out how to use a standard form, but use it for each business independently, and then display the average results in the reviewed business's node! But, I suppose I shouldn't ask that here. Another question it shall be. Thanks. – Mrweiner May 4 '12 at 19:18
  • Actually, it seems that there isn't a simple way of dynamically displaying the average results of the submitted forms in a node, as far as I can find. Off to find more solutions. – Mrweiner May 4 '12 at 20:15
  • Webform does not have Views integration and does not make your data available to other Drupal modules. You will want to go with a custom content type here. – Patrick Kenny May 4 '12 at 23:30

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.