By matglas86 on
Does anybody know of a module that give me the option to manipulate my node edit forms based on the roles users are in?
Here is the case:
I have a node edit form and a author that should not be able to edit the meta data. But I also have a site admin that should be able to edit this meta data. I want to control what they see through a module and based on there role.
I have searched for it but could not find it. Hope someone can help me.
Thanks in advance
Comments
What module are you using to
What module are you using to add/edit the meta data?
Not module specific
I think I get where your going here but I used it just as a example. What I want is to be able to set it on any fieldset that is loaded in the node edit form.
But to answer your question I believe I use nodewords.
In general terms, if there is
In general terms, if there is support for controlling who can edit a field it is controlled by permissions.
Found something
I found 2 modules that might be the right thing for the job. I'm testing them now.
They seem the same but have some differences.
Formfilter integrates with a form. When you a form is loaded it give you the option to filter that form or all forms. You hide the elements you select and everybody without the right permission will get a filtered form. You can not specify specific filter for different roles.
The Form Alter UI does it a little different in that it has a seperate UI where you openup a form. Here you specify how the form is altered. It is dot really filter. You use PHP code to alter the form. Its UI implementation is limited.
Both modules need some work in my opinion to be fully deployed as powerfull tools.
Thanks for those links, I'll
Thanks for those links, I'll check them out. In the past, I have always written a custom module to do this, implementing hook_form_alter and adjusting the form manually with PHP code. Depending on how complex your roles / variations are, thismay not be the easiest way for you though.
_
Not sure why you need a module for this-- as nevets already pointed out, the items available on the node edit form are shown based on the permissions given to the user role. If you don't want someone to have access to a particular function just set the permissions as desired.
For cck fields, there's the content permissions module, part of the cck package, or the field permissions module.
UI altering
I seem to run against the problem over and over again that some module that add functionality to the node edit form don't implement a thorough permission set. Its not possible to alter your form in a generic way for different roles without writing your own form_alter hook. If you look at the usage statistics of both modules you see that they both are used quick regularly.
I am now implementing it myself because they both lack some functionality that I would like to see. If I have time to write out several scenarios I'll explain what the advantage is.
Can someone help to explain
Can someone help to explain how to write a form alter hook. I need to remove a form element (not a cck element - the audience form element for OG) for specific role types.