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: handle RadioField submission values when using a custom "other" choice. #421

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

justlevine
Copy link
Member

What

This PR adds explicit handling for gf_other_choice and input_%id%_other on RadioField submissions.

This is a nonbreaking change.

Why

After GF made internal changes to their state management in 2.7 (2.6?), passing a custom choice value would fail validation. However we had no tests in place to let us know this stopped working 🤦.

This was reported as a documentation issue in #390 and #417 , but it was actually a bug.

How

The submission still takes a value as usual, If the Radio field has choices enabled, then we set the necessary GF_Entry input values.

Testing Instructions

Additional Info

Checklist:

  • This PR is tested to the best of my abilities.
  • This PR follows the WordPress Coding Standards.
  • This PR has proper inline documentation.
  • This PR has unit tests to verify the code works as intended.
  • The changes in this PR have been noted in CHANGELOG.md

@justlevine justlevine merged commit b70ef41 into AxeWP:develop Jun 4, 2024
15 of 18 checks passed
@justlevine justlevine deleted the fix/radio-other-choice branch June 4, 2024 11:54
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.

1 participant