Give us your best ideas!

Default selected value in option field

It would be useful to select a default selected option for any option field.

Often you have a default value in the background if no value is selected, which is not entirely clear for the editor. It would be much clearer if you could set a value that is pre-selected for this field.

This would also eliminate code such as "if field is empty, use this hardcoded value".

  • Adam Clettborn
  • Aug 10 2023
  • Reviewed
  • Attach files
  • Jonas Kastebo commented
    24 Aug 09:34am

    I agree that this would be good but there is the option to use validators to set a value on validationmode = create and/or field value is null.

    We usually do this for fields like text option and boolean fields so that they have a selected value first time you edit the entity.