Forms: Radio and checkbox options stripped from older forms #41059
Labels
[Block] Contact Form
Form block (also see Contact Form label)
[Feature] Contact Form
[Feature] Forms Blocks
Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc.
[Plugin] Jetpack
Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/
[Pri] Normal
Triaged
[Type] Bug
When a feature is broken and / or not performing as intended
Impacted plugin
Jetpack
Quick summary
Slack thread contains discussion: p1736794493216829-slack-C0CMN0V97
A jetpack user had a form inserted +6 months ago. They tried to edit the post and found that options for radio and multi-checkbox field were being stripped.
Upon investigation, I found that the block markup in the code editor was different than a newly inserted block. New blocks have an extra div container around the option. If you insert a new radio field in a form block and go to the code editor, the radio options are enclosed in a
<div class="wp-block-jetpack-field-radio">
div. Likewise, checkbox options are contained in a<div class="wp-block-jetpack-field-checkbox-multiple">
. Those divs are missing in the customers block code, resulting in fields being stripped.We need to determine if this was an odd, one-off issue, or if we've changed block markup in a way that is not backwards compatible. If the latter, we need to see if there's a way to ensure that we do not break form blocks when users go back to edit older forms.
Steps to reproduce
Site owner impact
Fewer than 20% of the total website/platform users
Severity
Moderate
What other impact(s) does this issue have?
No response
If a workaround is available, please outline it here.
To work around the issue, a user can manually insert the missing divs in the code in the code editor, and everything will work as expected.
To fix for radio fields
Search for
<!-- wp:jetpack/field-radio
and add this right after that tag closes:<div class="wp-block-jetpack-field-radio">
Search for
<!-- /wp:jetpack/field-radio -->
and add</div>
just before that.To fix for multi-checkbox fields
Search for
<!-- wp:jetpack/field-checkbox-multiple
and add this just after that tag closes:<div class="wp-block-jetpack-field-checkbox-multiple">
Search for
<!-- /wp:jetpack/field-checkbox-multiple -->
and adding</div>
just before thatPlatform (Simple and/or Atomic)
Self-hosted
The text was updated successfully, but these errors were encountered: