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
Is your feature request related to a problem? Please describe.
I recommend displaying form errors in form pop-up modals (ie: Create Wizard). A good example of a problem I see is with the "Import From JSON" plugin action functionality. Here are some details.
When I click "Import From JSON" in the action menu, a pop-up modal appears with a file-input control that expects a file with JSON contents.
If I choose a file that fails validation, a red X appears next to the form with no information about what the error is, why validation failed, or what I need to fix.
Instead, I have to close the pop-up modal and look at the top of the screen to read the notification error.
Then I have to re-open the pop-up modal and try again. As you can imagine, this is not ideal especially if there are a number of form controls that need to be populated in the pop-up modal.
Describe the solution you'd like
I think it makes more sense for every form control to have an associated error message that would appear immediately under the control. That way, the validation feedback is immediate without having to close, reopen, and repopulate the pop-up modal.
As far as implementation is concerned, a plugin control's validation function will have a second optional parameter, "fail", which is a function that takes one argument, an error message. So if validation fails, the validation function would simply contain one of the following code options:
fail('This file must contain JSON.'); return false;
....or.... return fail('This file must contain JSON.');
For example:
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I recommend displaying form errors in form pop-up modals (ie: Create Wizard). A good example of a problem I see is with the "Import From JSON" plugin action functionality. Here are some details.
When I click "Import From JSON" in the action menu, a pop-up modal appears with a file-input control that expects a file with JSON contents.
If I choose a file that fails validation, a red X appears next to the form with no information about what the error is, why validation failed, or what I need to fix.
Instead, I have to close the pop-up modal and look at the top of the screen to read the notification error.
Then I have to re-open the pop-up modal and try again. As you can imagine, this is not ideal especially if there are a number of form controls that need to be populated in the pop-up modal.
Describe the solution you'd like
I think it makes more sense for every form control to have an associated error message that would appear immediately under the control. That way, the validation feedback is immediate without having to close, reopen, and repopulate the pop-up modal.
As far as implementation is concerned, a plugin control's validation function will have a second optional parameter, "fail", which is a function that takes one argument, an error message. So if validation fails, the validation function would simply contain one of the following code options:
fail('This file must contain JSON.'); return false;
....or....
return fail('This file must contain JSON.');
For example:
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: