ploneplone-3.x

How does one default to current date and time for content publishing?


In this link, http://plone.org/documentation/how-to/set-default-datetimefield-current-date-time it describes how to do this with new Schema attributes. I could update all umpteen content types in our system use this method, but I would prefer something a bit less work intensive, since if I have to change umpteen content types it will be all too easy to make a mistake.


Solution

  • maybe a js soln? have an onload event that looks for datetime widgets by id (or one of those common attributes) and then reset the time based on the browser time. You can filter new vs edit based on whether or not a non-prefilled required attribute has been filled yet (i.e. Title)