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

Add property requireTouched for form fields #3236

Closed
DanielRyanSmith opened this issue Aug 7, 2023 · 3 comments
Closed

Add property requireTouched for form fields #3236

DanielRyanSmith opened this issue Aug 7, 2023 · 3 comments

Comments

@DanielRyanSmith
Copy link
Collaborator

Currently, all form fields require the user to interact with that field or make changes in order to submit the field's value for changes in their feature. This caused a bug today, as the accuracy verification checkbox has a default "checked" (or "true") value. Most users to not interact with this field before submitting the form, which means this field was treated as not "touched" by the user, and was not part of the submitted changes in the request.

Some form fields, like the accuracy verification checkbox field, should not be required for users to interact with in order to change the value when submitting a form. Some fields can be filled with default values that the user will not change before submission, and these values should be sent over to be processed in the Features API.

Ideally, we can designate which fields do not require user interaction to be part of the request, so it would be useful to designate certain fields as not required to be touched. This requireTouched property could be added and referenced from the field definitions in client-src/elements/form-definition.js.

@jrobbins
Copy link
Collaborator

@DanielRyanSmith All done or is there remaining work on this issue?

@DanielRyanSmith
Copy link
Collaborator Author

Work on this has not been done yet. I added a special case in the code to always submit the accurate_as_of form field value whether it has been touched or not, but it's possible that there could be more fields that should be handled the same way. In that case, the approach described above still needs to be implemented.

@DanielRyanSmith
Copy link
Collaborator Author

Closing this since #3425 has landed. We have no other fields that function this way, but If new fields come up and require function similar to the accurate_as_of checkbox, then a defaultTouched or requireTouched property might be worthwhile in the form definition. Without that needed yet, this is likely not worth pursuing.

@DanielRyanSmith DanielRyanSmith closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants