Automattic / Automattic/jetpack

Contact Form: When using "Checkbox with multiple items" - commas break checklist

Open
#2,917 9 comments 0 reactions 0 assignees View on GitHub
[Feature] Forms [Pri] Low Bug Customer Report [LEGACY]
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

When setting up a "checkbox with multiple items" field, if there is a comma in one of the fields, it breaks that entry into two lines due to the commas in the shortcode defining each field item.

Example:
`[contact-field label='Multiple Checkboxes' type='checkbox-multiple' options='I love multiple checkboxes!,I like multiple checkboxes.,Multiple checkboxes are OK,I guess.,I wish I could have had them years ago!,Checkboxes are so last year.,I love Jetpack!'/]`

Intended display:
- [ ] I love multiple checkboxes!
- [ ] I like multiple checkboxes.
- [ ] Multiple checkboxes are OK, I guess.
- [ ] I wish I could have had them years ago!
- [ ] Checkboxes are so last year.
- [x] I love Jetpack!

Actual display:
- [ ] I love multiple checkboxes!
- [ ] I like multiple checkboxes.
- [ ] Multiple checkboxes are OK
- [ ] I guess.
- [ ] I wish I could have had them years ago!
- [ ] Checkboxes are so last year.
- [ ] I love Jetpack!

Confirmed that commas have no effect in a single checkbox field entry.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the contact form shortcode using the provided checkbox-multiple example and trace how its options are split. The fix is done when an option containing a comma remains one checklist item while other items still render correctly; no specific file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.