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

Checkbox Data Not Submitted in Form #3

Closed
webhkp opened this issue Feb 11, 2025 · 0 comments · Fixed by #4
Closed

Checkbox Data Not Submitted in Form #3

webhkp opened this issue Feb 11, 2025 · 0 comments · Fixed by #4
Assignees

Comments

@webhkp
Copy link
Owner

webhkp commented Feb 11, 2025

Checkbox values for the methods[] field are not being submitted correctly in the FastAPI form. Since checkboxes allow multiple selections, the form should send an array of selected values, but currently, only a single value or none is received.

Steps to Reproduce

  • Open the form in the browser.
  • Select multiple checkboxes for request methods (e.g., GET, POST).
  • Submit the form.
  • Check FastAPI request data—only one method is received instead of an array.

Expected Behavior

The form should send an array of selected methods to FastAPI, ensuring all checked values are properly submitted.
Proposed Fix-

  • Modify the frontend to collect multiple selected checkboxes correctly before form submission.
  • Update JavaScript validation to ensure at least one checkbox is selected.
  • Ensure FastAPI correctly receives and processes the list of methods.
@webhkp webhkp linked a pull request Feb 11, 2025 that will close this issue
@webhkp webhkp self-assigned this Feb 11, 2025
@webhkp webhkp closed this as completed in #4 Feb 11, 2025
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 a pull request may close this issue.

1 participant