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

Fields should not indicate they are required if they are disabled #895

Open
samglover opened this issue Nov 22, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@samglover
Copy link

Describe the bug

When the user chooses a court from the pre-selected options based on the address they entered, the drop-down selector with the full list is disabled, but the required indicator asterisk still appears:

Screenshot 2024-11-22 at 9 38 35 AM

This could be confusing to some users, since the asterisk and the "Select…" text suggests they ought to do something, but they can't because the field is disabled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the choose a court (courts matching provided address were found) screen after entering a valid address
  2. Select any of the courts shown
  3. Scroll down to drop-down selector below "Does the list above look wrong?"
  4. See that the red asterisk is still showing even though the selector field is disabled

Expected behavior
The red asterisk should not show up when the field is disabled.

Additional context
I used CSS to solve the problem for a small claims interview for the Massachusetts Trial Court. Here is the pull request.

@samglover samglover added the bug Something isn't working label Nov 22, 2024
@samglover
Copy link
Author

This is actually an issue on other disabled fields, as well, so I think we can generalize the fix.

Screenshot 2024-11-26 at 4 18 55 PM

I haven't researched all the ways Docassemble adds a required indicator, but this CSS gets all the indicators in the above screenshot:

.darequired:has(.form-control, .form-select:disabled) .da-form-label::after {
  display: none;
}

@samglover samglover changed the title Court selector should not be required when disabled Fields should not indicate they are required if they are disabled Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant