From 250605693214b289f8d453acb3b0ebcc1a2feed7 Mon Sep 17 00:00:00 2001 From: William Viana Date: Wed, 25 Feb 2026 12:27:02 +0100 Subject: [PATCH 1/2] Fix "Other" toggle not updating the option label in the editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When toggling "Other" on via the per-option sidebar control, only isOther was set — the existing label was left unchanged, so an option labeled "Option B" would visually remain "Option B" despite being an "Other" option. Now the label is cleared when toggling on, letting the "Other" placeholder text take effect (matching the behavior of the parent-level "Include Other option" toggle). Co-Authored-By: Claude Opus 4.6 --- projects/packages/forms/src/blocks/option/edit.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/packages/forms/src/blocks/option/edit.js b/projects/packages/forms/src/blocks/option/edit.js index 080b7c1489c..79ad0af9675 100644 --- a/projects/packages/forms/src/blocks/option/edit.js +++ b/projects/packages/forms/src/blocks/option/edit.js @@ -151,7 +151,12 @@ const OptionEdit = ( { setAttributes( { isOther: value } ) } + onChange={ value => + setAttributes( { + isOther: value, + label: value ? '' : label, + } ) + } help={ __( 'Show as "Other" option with a text input field below it.', 'jetpack-forms' From 5325ed2024aeed7504307a93f237fb6e4151f8c9 Mon Sep 17 00:00:00 2001 From: William Viana Date: Wed, 25 Feb 2026 12:27:26 +0100 Subject: [PATCH 2/2] Add changelog entry Co-Authored-By: Claude Opus 4.6 --- .../forms/changelog/fix-forms-other-option-label-reset | 4 ++++ projects/packages/forms/src/blocks/option/edit.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 projects/packages/forms/changelog/fix-forms-other-option-label-reset diff --git a/projects/packages/forms/changelog/fix-forms-other-option-label-reset b/projects/packages/forms/changelog/fix-forms-other-option-label-reset new file mode 100644 index 00000000000..7e800f017fd --- /dev/null +++ b/projects/packages/forms/changelog/fix-forms-other-option-label-reset @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix "Other" option toggle not updating the option label in the editor diff --git a/projects/packages/forms/src/blocks/option/edit.js b/projects/packages/forms/src/blocks/option/edit.js index 79ad0af9675..4341daf637d 100644 --- a/projects/packages/forms/src/blocks/option/edit.js +++ b/projects/packages/forms/src/blocks/option/edit.js @@ -174,7 +174,7 @@ const OptionEdit = ( { tagName="div" className="wp-block" value={ labelValue } - placeholder={ __( 'Add option…', 'jetpack-forms' ) } + placeholder={ placeholderValue } __unstableDisableFormats onChange={ newLabel => setAttributes( { label: newLabel } ) } onMerge={ mergeBlocks }