-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a way to set values to fields regardless of its attributes #139
Comments
Thanks for te issue @latin-panda! Consider this workaround which has been used with forms containing cht widgets to set values or make fields not required. You'll have to execute this magic after you
https://github.com/medic/config-muso/blob/master/test/widget-hacks.js Currently, the behaviour of |
Please reactivate if the above workaround is not satisfactory. |
Please reactivate if the above workaround is not satisfactory. |
Is your feature request related to a problem? Please describe.
It'd be helpful to have a way to set values to fields regardless of its attributes (hidden, required, readonly, ...)
For example a field is required but has appearance hidden, then when running test case, it can't set the value (current validation code) and an error occurs when filling the form: “Required fields missing”
Describe alternatives you've considered
It'd be nice to use field name + group(s) name to find a field regardless if it’s visible, required, optional, readonly, hidden, or location deepness (groups). So we can pass something like key:value
Additional context
We were designing a form where some fields are automatically populated after a button action, these fields have hidden appearance because the data wasn't friendly or not relevant to the user, additionally the fields are required to prevent the user of continuing to the next page without performing the action.
Samples:
At the end to move forward, we've worked around the form design because test coverage is important however the UX decreased.
The text was updated successfully, but these errors were encountered: