0

I need to have someting like a feedback form that is possible to vote while view, and i am trying to use the fivestar to do so. Someting like this

But the problem is that one user should only vote once. I have already searched for some solitions and found something. It was to creat a custom module and with that hide the fivestar field and use the one from the function my problem is that i cant hide the field.
this is the code to hide the old and print the new.

  hide($content['field_fivestar_rating']);// This line will hide the stars which are coming from the fivestar module.
print custom_voting_print_rating($node->nid, $content['field_fivestar_rating']);
print $user_picture;
print render($content);

So i did but it doesn't work. The hide($content['field_fivestar_rating']) doesn't work, already try hide($content['field_fivestar']); The problem is that if i try to print $content['field_fivestar_rating'] it doesn't exitist.

So what i am asking is if somone knows what i should do. Sorry for my bad english.

Tuga4ev3r
  • 1
  • 2

1 Answers1

0

You can add your custom access rule inside:-

hook_fivestar_access($entity_type, $id, $tag, $uid)

This hook is provided by fivestar module.

Manish yadav
  • 339
  • 1
  • 2