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

bug: radio group does not participate in form submission #27016

Closed
3 tasks done
kristojorg opened this issue Mar 24, 2023 · 5 comments · Fixed by #27018
Closed
3 tasks done

bug: radio group does not participate in form submission #27016

kristojorg opened this issue Mar 24, 2023 · 5 comments · Fixed by #27018
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@kristojorg
Copy link

Prerequisites

Ionic Framework Version

v6.x

Current Behavior

Using react, I render a form with radio options and a submit handler. I would expect the radio options to be included in the form data on submit, but this is not the case. It appears this is because the IonRadio element does not properly render an <input type="radio" /> element.

Expected Behavior

The formdata should include the value of the selected radio.

Steps to Reproduce

  1. Open the stackblitz link
  2. select a radio option
  3. click sumbit
  4. check the console log to see the empty form data object.

Code Reproduction URL

https://stackblitz.com/edit/angular-kzrgpo?file=src/main.tsx

Ionic Info

Ionic:

Ionic CLI : 6.20.8 (/Users/kristo/.nvm/versions/node/v16.13.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 6.4.1 (/Users/kristo/d/ereading-clients/node_modules/@ionic/react)

Capacitor:

Capacitor CLI : not installed
@capacitor/android : 4.6.1 (/Users/kristo/d/ereading-clients/node_modules/@capacitor/android)
@capacitor/core : 4.6.1 (/Users/kristo/d/ereading-clients/node_modules/@capacitor/core)
@capacitor/ios : 4.6.1 (/Users/kristo/d/ereading-clients/node_modules/@capacitor/ios)

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v16.13.1 (/Users/kristo/.nvm/versions/node/v16.13.1/bin/node)
npm : 9.6.2
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Mar 24, 2023
@liamdebeasi liamdebeasi self-assigned this Mar 24, 2023
@liamdebeasi liamdebeasi changed the title bug: IonRadio does not render an <input> element bug: radio group does not participate in form submission Mar 24, 2023
@liamdebeasi liamdebeasi removed their assignment Mar 24, 2023
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Mar 24, 2023
@ionitron-bot ionitron-bot bot removed the triage label Mar 24, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the report. Here is a dev build with a proposed fix if you are interested in testing:

npm install @ionic/[email protected] @ionic/[email protected]

@kristojorg
Copy link
Author

Nice, thanks so much for the quick fix! Just tested and it works great : )

@liamdebeasi
Copy link
Contributor

Glad the dev build works! I am going to keep this open until #27018 is merged.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #27018, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 23, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants