My client has a system in which they allow nodes of certain content types to be created by authenticated users. The nodes are unpublished until they are reviewed by someone with the proper role and this all works correctly.
One of the requirements was allowing users to save a node as draft. I initially used the Save Draft module but found that was defaulting nodes to be published which caused problems. I worked around this by adding a hidden field called status that would change values based on which submit button was clicked via hooks.
Now, the issue comes when the node is reviewed. At that point, an admin will change the node to published. They would also like automatically like this hidden status field to change from "submitted" to "published". Normally, I would use a hook for this but through my testing, I can't seem to get form alter hooks to work in the admin section.
I suppose I have two questions here:
- Is there an easier way to achieve my end result here?
- Failing that, is there a way to automatically change the value of one field when a node is updated via the admin section?