Posted by Norrin on March 31, 2009 at 3:51pm
I'm running a test site on Drupal 6.10 using the CCK-, Calendar-, Date- and Views-module.
I would like to implement some kind of a logbook. Filling in the entries the user would have to fill in a From-date and a To-date. Also there would be a field (duration) calculating the difference between the given From- and To-date.
To minimize input errors and maximize usability I was wondering if there is an easy - maybe already existing - way to make Drupal calculate the value of the duration time field on the fly, after the user has set the From- and To-date BUT before hitting the send button to enter the data into the database.
I hope you'll get the idea. Any ideas or help is greatly appreciated.
Comments
maybe CCK Computed Field?
It looks pretty complex (http://drupal.org/project/computed_field) but should do what you want.
Alternatively, maybe Views Calc (http://drupal.org/project/views_calc) could display the duration on display - but it doesn't look as if that does subtraction, which you'd need to calculate the time.
Thanks
for hint, I'll check them out. :o)