Automattic / Automattic/jetpack
Forms: variations with radio option field have empty default values
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Reported in https://github.com/Automattic/jetpack/issues/41245#issuecomment-2629444121
In several variations (RSVP, feedback, appointment) there are radio fileds. When using these patterns, those fields are empty even if in code we have the example values defined.
Variations can be added via placeholder block, or via sidebar:
Current code:
https://github.com/Automattic/jetpack/blob/161a699b92a8bfd70b6232422123a60123143b01/projects/packages/forms/src/blocks/contact-form/variations.js#L192-L199
https://github.com/Automattic/jetpack/blob/161a699b92a8bfd70b6232422123a60123143b01/projects/packages/forms/src/contact-form/class-util.php#L114
### Result currently
With code:
```html
```
### Expected result
With code:
```html
```
Contributor guide
Research direction
Start with the radio variation code in projects/packages/forms/src/blocks/contact-form/variations.js around lines 192-199 and the related utility in projects/packages/forms/src/contact-form/class-util.php around line 114. Reproduce the RSVP, feedback, or appointment variations through the placeholder block and sidebar. Done means the defined radio labels appear as nested field-option-radio blocks instead of an empty option field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- full-stack
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100