Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2): add 'Others' to radio field in logic creation #4830

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

wanlingt
Copy link
Contributor

@wanlingt wanlingt commented Sep 8, 2022

Problem

Radio field's 'Others' does not show up in logic creation

Closes #4800

Solution

The check for 'Others' was already present in the form logic (isConditionFulfilled), it just wasn't being reflected in the options provided for Radio field. As the presence of 'Others' is reflected in othersRadioButton and does not exist in a field's fieldOptions, I added 'Others' to the list of options shown in logic (conditionValueItems).

Breaking Changes

  • No - this PR is backwards compatible

AFTER:
Recording 2022-09-08 at 16 47 56

Tests

  • - Include 'Others' in radio field logic for 'equals to' conditions. Form should reflect logic, submission should work as normal
  • - Include 'Others' in radio field logic for 'either' conditions. Form should reflect logic, submission should work as normal

Copy link
Contributor

@justynoh justynoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add for checkbox also?

@wanlingt
Copy link
Contributor Author

wanlingt commented Sep 8, 2022

do we need to add for checkbox also?

we don't do logic for checkbox so noope

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wanlingt wanlingt merged commit dedf61d into form-v2/develop Sep 8, 2022
@wanlingt wanlingt deleted the form-v2/fix-issue-4800 branch September 8, 2022 09:46
@justynoh justynoh mentioned this pull request Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants