0

Is there a way to setup content voting/rating on Drupal 7 in such way that the user must provide a reason for their vote/rating?

3

There are probably many different ways to create a feature where a comment is required along with voting. I guess it all depends on which method you're using for the voting part.

You could use the Fivestar module to Set up fivestar widget for User/Author rating with comment on any content type. 7X. Here you use allow for rating to be available on each new comment. You can use the usual comment field permissions to require input on both the voting field and the comment text area.

There are more ways to create something similar with the Fivestar module, it all depends on your particular needs.

Another module that can be used for voting is Flag. You can add Fields to Flags just like you can on a Content type: Attaching fields to flags (Flag 3.x). This way Flags are used for the voting part, and the Text area field created on the Flag is used to type in the reason. You can configure both the Flag and the Text area field on the Flag to be required based on Roles and Permissions.

Basically it's all about attaching a Text field to your voting widget and setting up permissions to make it required so the form can't be saved if it's empty.

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.