apostrophecms / apostrophecms/apostrophe

Cannot set checkboxes to be checked by default using def

Open
#3,572 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4.6k
Forks
650
Avg merge
19h 21m
Merged PRs (30d)
23

Description

## To Reproduce

Step by step instructions to reproduce the behavior:

> 1. Create a widget. In index.js create a field with the type checkboxes
> 2. Enter def value. which is the default value for the field(Values must be from the defined choices' values) Or enter def: true
> 3. Checkbox should now be checked when adding that field to the page, but it isn´t

## Expected behavior
> Checkbox should be checked when def value is set

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by defining a checkbox field with a def value in index.js, using one of the defined choice values or true. Trace the checkbox field's default-value handling and verify that adding the field to a page renders it checked when def is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.