0

I need to set default values for a "Grouped Checkboxes" field. The Checkbox is using a configured list datasource.

I did set the "Default Value" option as one of the configured list options's key, however I see no default checked option being displayed when trying to create new content.

2 Answers2

1

You can set it by JQuery

$('.GroupedCheckedboxes').prop('checked', true);
Tony Dong
  • 3,213
  • 1
  • 29
  • 32
1

It looks like there is a gap there at the moment. I've created an enhancement request to add support for this here: https://github.com/craftercms/craftercms/issues/2566

In the ticket, I've also provided a small workaround patch you can make to the group checkbox control which will allow you to set default values.

I am not sure if the solution to my enhancement request will be the same as my workaround so you will want to keep an eye on that ticket.

Russ Danner
  • 693
  • 3
  • 11