I am struggling to assign a default value for a field living in my model.
As per your doc, i can assign a static value.
But assigning a function, which is supported by mongoose, does not seem to work there.
Assigning a function instead of a value in mongoose schema does not assign default value when in the form creation interface.
The creation form field is populated with default value returned by the function.
Form field is empty.