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've created a component that presents a Dialog containing the form. Submitting the form posts to a REST API, which can return an error. I'm using the $page.form to check for the error and display it next to the submit button.
If I submit bad data to the form, the error message is shown as expected. If I close the dialog at this point however, and then reopen it, the error message is still there next to the submit button. How would I go about "resetting" the dialog when it is closed, such that when it is reopened, there is a fresh, empty form and no error message displayed?
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've created a component that presents a Dialog containing the form. Submitting the form posts to a REST API, which can return an error. I'm using the $page.form to check for the error and display it next to the submit button.
If I submit bad data to the form, the error message is shown as expected. If I close the dialog at this point however, and then reopen it, the error message is still there next to the submit button. How would I go about "resetting" the dialog when it is closed, such that when it is reopened, there is a fresh, empty form and no error message displayed?
Beta Was this translation helpful? Give feedback.
All reactions