0

I'm developing a complaint portal for administration. All complaints are submitted by sites users. I'm fetching these complaints using views and don't know how to add active/Inactive as drop down options in each complaint. As everybody knows complaints' status stays active until it resolves. Active/inactive field is not existed in content type form.

This is for admin ease, admin can change the status of the complaint active or inactive.

Please let know if anyone has any experience regarding this.

  • The question is, who will set this option? The user? Or someone else? If it's the latter you could work with the field-permissions module (drupal.org/project/field_permissions) and set the field visibility only for those people who are editing this. Ah, i just saw you answered the question already. So, give field permissions a go... – Volker Apr 10 '17 at 11:25
  • Please see the comment below in first answer for more clarification what I needed. – usmanjutt84 Apr 12 '17 at 12:39
1

You can use the Field Permissions module according to module's page:

The Field Permissions module allows site administrators to set field-level permissions to edit, view and create fields on any entity.

Then set permissions for your active/inactive field to be for admins only, then the field will not show for general users but admins will be able to change the status when they view each complaint.

  • Thanks for the response. I tried to add field permission module it will only hide fields from the restricted roles. However, my main purpose is to add this field in views as dropdown with all values so admin role can change the values. Is this possible? – usmanjutt84 Apr 12 '17 at 12:38
  • Do you mean that you want to get the admin to change the values in bulk? – longboardnode Apr 12 '17 at 15:16
1

I have done this task. Use Field Permissions module to hide a field from user end. You can set permissions when you create or edit field. Then install editable fields and in creating views, add a field that have multi values (like list type field) and change the Format from default to editable. That's it

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.