0

I have created new field for my content type "Flag", its list type field

possible values of it is

-Draft 
-Sent 
-Approved 
-Rejected 

now for this field new table is created,now i want to store date here,what i exactly want is like:

-Draft on date DD/MM/YYYY (the date of the creation of the project)
-Sent on date DD/MM/YYYY
-Approved on date DD/MM/YYYY
-Rejected on date DD/MM/YYYY

now how to achieve it.

am using drupal 7

2

Use Field Collections and add two fields to field collection and enable field collection field on your content type... Or Create two fields Flag and Flag date...

  • Flag
  • Flag Date

OR

You can use revisions to track these changes in Drupal. When ever you change above field make content as a new revision so that you can track dates too...

OR

Create a few more date fields, each for possible values to track the dates... use form api #states property to hide display fields based on selection of flag value..

  • Flag
  • Draft Date
  • Sent Date
  • Approved Date
  • Rejected Date
  • oh yes i like the second suggestion,but how to maintain it,means whenever article flag changed to any other value need to add it not update it then and then only i will get date for all flags – Er.KT May 21 '14 at 7:04
  • Updated my answer :-) – Anil Sagar May 21 '14 at 7:08
  • Create a few more date fields, each for possible values to track the dates. means? – Er.KT May 21 '14 at 7:12
  • and i can not use revisions, because we can not check which fields updated in that action – Er.KT May 21 '14 at 7:16
  • Check Updated answer .. – Anil Sagar May 21 '14 at 8:31

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.