Active
Project:
Conditional Fields
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2012 at 12:54 UTC
Updated:
16 Oct 2014 at 16:17 UTC
Jump to comment: Most recent
Comments
Comment #1
peterpoe commentedYou can use the Field Permissions module to do this: http://drupal.org/project/field_permissions
Comment #2
reych9 commentedYou did not understand me I do not think field_permissions solve my problem.
field_permissions hides the fields acording to the role of the active user.
on my site only the administrator can create a new account, and is the administrator who selects what role will have this new account.
the utility I need is that according to the role selected by the administrator for this new account, show or hide the fields to be filled by the administrator.
field_permissions detects who is the manager and showed him all the fields.
Comment #3
peterpoe commentedSorry, I misread. Conditional Fields only supports Field API fields. If you want to add a dependency for form elements that are not fields, you have to code it. You can write your own code, maybe using the conditional_fields_attach_dependency() function in a custom module, but I think it's currently broken for custom dependencies.
Having an UI for custom dependencies would be nice though.
Comment #4
reych9 commentedthanks for your prompt replies, I'm not an expert programmer, I'm just a novice, I hope shortly to delve a little deeper into the drupal code.
for now I'm trying to solve the problem by creating a new static field with all the roles, hiding the original roles field and linking them with onclic jabascript event, but I found a new problem, I have just post it,
thank you very much again.
Comment #5
mustanggb commentedThis was as far as I got before getting stuck.
Comment #6
liquidcms commentedanyone make any progress on this?