SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
563 stars 345 forks source link

Registration Registrant Attribute - Boolean field type - "Checkbox" Control Type - doesn't honor the "Required" setting #5921

Closed cjfountain closed 1 week ago

cjfountain commented 1 week ago

Description

On a Registration Registrant Attribute, when setting a Boolean field type with a "Checkbox" Control Type the form doesn't honor the "Required" setting. The Toggle and DropDown options work. See screenshots below.

Snip - Registration External Website - Google Chrome (5)

Snip - Event Registration Rock RMS - Google Chrome (18)

Snip - Event Registration Rock RMS - Google Chrome (19)

Snip - Registration External Website - Google Chrome (2)

Snip - Registration External Website - Google Chrome (3)

Snip - Registration External Website - Google Chrome (4)

Actual Behavior

The "required" field isn't required on the registration form - but only for the Boolean Field Type with a Checkbox Control type.

Expected Behavior

I would expect the field to be required.

Steps to Reproduce

Issue Confirmation

Rock Version

v16.4

Client Culture Setting

en-US

cjfountain commented 1 week ago

I now realize this isn't a bug.

Here's what I've been told... "When you're using a checkbox for a boolean, having it unchecked (a false value) is a valid response - it's the same as someone selecting 'no' from a drop-down list.

If you want to have a check box that someone has to select, try a multi-select with just one option instead, and require that."

cjfountain commented 1 week ago

For those coming behind me... Here is the "fix" to what I was trying to do. I wanted to force people to select the box indicating they agreed to something before continuing on with the form.

Here is how to set up the multi-select field with one option.

image

Here is what it looks like

image