webiny-js
webiny-js copied to clipboard
CMS: Add an ability to define default value for a field
Is your feature request related to a problem? Please describe.
At the moment we can define a default value of a field in CMS.
Although, we have an option to define predefined values
, the returned value after creation is null
.
For example, let's say, we created a CMS model named Product
with a field discount
. We might want to set 10%
as the default
value for it, which we can at the moment from UI.
Describe the solution you'd like.
No response
Describe alternatives you've considered.
As an alternative, I'm currently using the onBeforeEntryCreate
lifecycle event to assign the default value.
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.