1

Ive added a custom comment field to comments of my node i.e. new fields beneath comment_body that being field_flag_reason and field_unflag_reason

I want to hide these two fields for specific roles so I'm looking to use a hook with the logic to display when appropriate, the difficulty I'm having is I'm confused as to what element I should be trying to target in the rendered array and any changes I try don't seem to take effect, think I might be going about it the wrong way, any help would be greatly appreciated.

1

Have you ever tried Field Permission. I think it'll help to solve your requirements. Check the video tutorial to use that module Drupal 7 Field Permissions Module

3
  • Hey Stone Vo, looks like it might be what I'm needing Ill have a look and let you know. Cheers Jean
    – Jean
    Jun 3 '13 at 2:24
  • Works great cheers:)
    – Jean
    Jun 3 '13 at 2:51
  • You did that. Cheers :)
    – Stone Vo
    Jun 3 '13 at 2:54

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.