I am looking a module that will only display some fields if a condition is met. Basically only administrators or editors should be able to see those fields in the display. In editing mode it should be alright as only editors have the right to view those fields.

I have checked the documenation for Conditional Fields module and Field Conditional States which enable this but they do it based on field contents, but I want run if a PHP condition is met. Are there any other similar modules which implement this?

  • Hi you can also do it without a module? is there any specific reason why you require module. Feb 11, 2015 at 16:22
  • @DEVARAJJOHNSON I hve settled on the Field Permissions module, but can you explain how it would be done without a module?
    – vfclists
    Feb 14, 2015 at 0:12
  • yes, in form_alter use $form['field_name']['#access'] = FALSE; will hide the field in the form. Feb 16, 2015 at 7:39

1 Answer 1


Have a look at the Field permissions module. It allows for role-based conditional display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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