This seems like it should be simple, but has been challenging me for a few days now. I have a custom content type which contains a selectlist which defaults to 'Pending' for new nodes. Someone will later come along and set these to 'Approved' and when they do so I need a text field to be available and required prior to saving the node again.
If I was coding this outside of Drupal 7 I would probably make the textfield disabled, required, and give it a default value. Then use an .onchange to check if it is set to “Approved” and, if so, enable it and empty the default value but I am not sure how to implement this with Drupal yet.
I didn't find anything else in the way of modules that seemed to work, so I have now begun looking at the function 'drupal_process_states'. This seems like it might be the right path, but is going to take me a while to figure out.
Any help is appreciated. Thanks!