webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

CMS: Add an ability to define default value for a field

Open Ashu96 opened this issue 2 years ago • 1 comments

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.

Ashu96 avatar Apr 15 '22 09:04 Ashu96

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.

webiny-bot avatar Aug 14 '22 07:08 webiny-bot