Jetpack: Checkbox Required Toggle Missing

Created on 12 Jun 2020  路  6Comments  路  Source: Automattic/jetpack

Steps to reproduce the issue

  1. Add Jetpack Form
  2. Add Checkbox field
  3. View block controls and confirm checkbox "required" toggle is missing

What I expected

Should be able to require a checkbox field via editor view InspectorControls toggle.

  • Tested working in Jetpack version 8.5
  • Missing in version 8.6+

The field itself still supports required adding the "required" attribute to the code view like this:

<!-- wp:jetpack/field-checkbox {"label":"Checkbox Test", "required":true} /-->

But this is not user-friendly. A typical user would expect the ability to add this attribute using a GUI toggle.

Removed in #15876.

What happened instead

No InspectorControls "required" toggle exists.

Screenshots
Screen Shot 2020-06-12 at 8 42 42 AM

Contact Form [Pri] Low [Status] Needs Design [Type] Enhancement

Most helpful comment

This is missing on a single checkbox field. I will work on a PR to add this. I mistakenly thought required didn't apply to a single checkbox because it would always force it to be checked regardless of value.

All 6 comments

You should be able to control this setting here:

image

cc @apeatling Maybe we should add a toggle in the inspector controls as well?

Adding the "Needs Design" label as well to get another opinion.

This is missing on a single checkbox field. I will work on a PR to add this. I mistakenly thought required didn't apply to a single checkbox because it would always force it to be checked regardless of value.

@jeherve Added a PR to fix this here https://github.com/Automattic/jetpack/pull/16162

@apeatling we've had a question about this in the wpcom forums as well. Will this fix be applied to wpcom automatically with the JP release that contains it?

Looks like there's a Calypso issue for this as well in https://github.com/Automattic/wp-calypso/issues/42956

Will this fix be applied to wpcom automatically with the JP release that contains it?

I've just applied the fix to WordPress.com; the problem is fixed there, and will be available for Jetpack and Atomic users on July 7.

Thanks, @jeherve

Was this page helpful?
0 / 5 - 0 ratings