By kkrgopalan on
Hi All,
I have workflow enabled for a particular CCK content type. Based on the workflow state I would like to enable or disable the edit form for this content type for certain users.
So when the workflow state is 'LOCKED' I would like to have the edit page display a message saying the "form is locked".
I am trying to do this using the hook_form_alter. How do I put in a custom message instead of the existing form would be the question?
Thanks
Krishna
ps: I know that the workflow access module sounds like a perfect fit but I would prefer not to use it as it might have a performance overhead.
The is proposed to have more than 100000 nodes.
Comments
markup
Take a look here:
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...
By using hook_form_alter to unset the existing form elements and adding a form element of the type 'markup' you can achieve what you're looking for.
Doug Gough
ImageX Media
Thanks that worked
Thanks that worked perfectly!
Instead of unsetting the form elements I just did $form = array();
and set the markup after that.
Best,
Krishna