You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should the python_code field be optional in FilingStatusForm? (An invalid form control with name='python_code' is not focusable.) error is coming on clicking save.
#521
Open
unreal0901 opened this issue
Feb 24, 2025
· 1 comment
I encountered an issue where the python_code field is marked as required, which prevents form submission when the field is empty. This causes an invalid form control error in the console:
"An invalid form control with name='python_code' is not focusable."
Additionally, the modal dialog that contains the form is using aria-hidden="true", which is blocking focus on the form elements.
Would it be better to make python_code optional? Adding the following line in the __init__ method of FilingStatusForm seems to resolve the issue:
self.fields["python_code"].required=False
Should this be the correct approach, or is there a reason why python_code should remain required?
This type of error is coming when clicking on save button..
The text was updated successfully, but these errors were encountered:
Thank you for reporting this issue and for submitting a pull request with the fix! Making python_code optional by setting self.fields["python_code"].required = False in the init method seems like a reasonable solution, especially if an empty field is preventing form submission.
Additionally, the aria-hidden="true" issue in the modal might be causing accessibility and focus-related problems. We’ll review your PR and test the changes to ensure everything works smoothly.
I encountered an issue where the
python_code
field is marked asrequired
, which prevents form submission when the field is empty. This causes an invalid form control error in the console:Additionally, the modal dialog that contains the form is using
aria-hidden="true"
, which is blocking focus on the form elements.Would it be better to make
python_code
optional? Adding the following line in the__init__
method ofFilingStatusForm
seems to resolve the issue:Should this be the correct approach, or is there a reason why
python_code
should remain required?This type of error is coming when clicking on save button..
The text was updated successfully, but these errors were encountered: