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
I have a simple “update location” form that loads with initial data fetched from the database. On load, all the data is valid. I need to enable or disable the submit button based on the form’s meta.valid state (true/false).
However, I’m encountering an issue: when the form loads, meta.valid is set to false until all fields are interacted with, even though the data is already valid. This behavior doesn’t align with the intended functionality, as the user may only need to update a single field.
Am I approaching this the wrong way? Is there a way to load the form with meta.valid set to true by default if the initial data is valid? I’ve attached a snapshot of the form for reference.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a simple “update location” form that loads with initial data fetched from the database. On load, all the data is valid. I need to enable or disable the submit button based on the form’s meta.valid state (true/false).
However, I’m encountering an issue: when the form loads, meta.valid is set to false until all fields are interacted with, even though the data is already valid. This behavior doesn’t align with the intended functionality, as the user may only need to update a single field.
Am I approaching this the wrong way? Is there a way to load the form with meta.valid set to true by default if the initial data is valid? I’ve attached a snapshot of the form for reference.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions