How to programmatically set a default value in Composer ?

Permalink
Here is my problem. I have a page type that is edited with Composer. When a new page is created, I would like to set some attributes with default values that must be calculated - for instance, a date with a default at 60 days from now. The user should be able to leave the attribute blank by removing the default value, so I can't set it when the page is saved.
I tried using an event listener to hook on 'on_page_add', but it seems to be triggered too early or something - the values I set to attributes do not seem to stick.
Is there any way to achieve what I want ?

 
ramonleenders replied on at Permalink Reply
ramonleenders
Good question, I haven't had a use case so far, but would be interested to know a solution too (in case I have a project that needs it). If this is difficult out-of-the-box, we should think of a way to implement this into the core of concrete5.