coderedcorp / coderedcorp/wagtail-flexible-forms

Required checkbox field

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

It seems like there's no way to define a required checkbox field. This is useful for users to acknowledge terms of service or other things that require explicit opt-in.

I think the problem is that the `required` attribute [defaults to `False`](https://github.com/coderedcorp/wagtail-flexible-forms/blob/62d7b8d447d35ca7ff5935e2b1558b0420bbbbc6/wagtail_flexible_forms/blocks.py#L40), which is quite different from Django in general. A solution would be to default to `True`, or to inherit from `OptionalFormFieldBlock` to make each checkbox configurable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.