I have a content type "Page" and one of its fields is a term reference to the taxonomy term "Page Type"

Another field is "Expiry Date"

The page type starts off as "Open Consultation", but I need it to automatically change the term reference to "Closed Consultation" if the "Expiry Date" has passed.

I've been a developer for years, but I'm still quite new to Drupal (7)... I know the GUI, but not php or which files to override (if that is the answer)

So, I need a basic explanation of how to achieve this. Thanks !


Take a look at the Computed Field Module, I'm not sure if can handle the date field type or not. on the other hand if Computed Field didn't do what you want you could do a hook_form_alter hook in your custom module. and code your logic there.

| improve this answer | |
  • Yeah, I was thinking that the answer would be using hook_form_alter, but can you give me any direction on the code logic ? – wotney Sep 2 '15 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.