-
Notifications
You must be signed in to change notification settings - Fork 934
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
dynamic required fields and asterisks on input labels #205
Comments
You can use |
For future generations:
The resulting object contains Passing currentValues is important if your schema is dynamic (using when/lazy etc). |
I tried |
I was trying to do this exact thing. Doing a lot of searching after it didn't work led me to:
This is a pretty important feature for accessibility. It doesn't seem like |
I ended up implementing this by doing the |
I have a schema for an address like this:
The user has to enter street and number or the post office box. Now I want to add asterisks to the labels of the input fields dynamically. That means, when the input fields for
street
,number
andpoBox
are empty, there are asterisks at all there 3 labels. When the user enters a PO box, the asterisks atstreet
andnumber
disappear.The question is, how can we 'calculate' whether a specific field is required for the current form values?
The text was updated successfully, but these errors were encountered: