Revolution: Make the tab active if there are errors in the form

Created on 16 Jun 2020  路  6Comments  路  Source: modxcms/revolution

Bug report

Summary

@Alroniks made extremely useful functionality that catches the tab with errors and makes it active - https://github.com/modxcms/revolution/pull/14235

But, as it turned out, tab does not always become active.

_For example, if the name TV contains invalid characters:_

tab_error_1

_Although if the name TV is empty, the tab is activated, everything is fine:_

tab_error_2

Expected behavior

Make the tab active if there are ANY errors in the form

Environment

MODX 2.x >

Most helpful comment

Almost finished on this issue and #15088 that you mentioned. Trying to cover as many scenarios as I can think of ... the last of which (for now) is handing the behavior when tvs are moved into custom panels via manager customization rules. I should have the PR very soon...

All 6 comments

I have a solution for this and will be submitting a PR in the next few days. The reason this happens (in the other element form panels as well) is the failure method that ultimately fires the failureSubmit event is missing. The reason it works when the name field is blank is that the native extjs allowBlank validation is triggering the failure whereas invalid field value errors are reported in the submission failure response.

I have a solution for this and will be submitting a PR in the next few days.

It would be great! If you have a desire, look at this issue - https://github.com/modxcms/revolution/issues/15088 they are related.

Almost finished on this issue and #15088 that you mentioned. Trying to cover as many scenarios as I can think of ... the last of which (for now) is handing the behavior when tvs are moved into custom panels via manager customization rules. I should have the PR very soon...

I should have the PR very soon...

You can always create a PR and mark it as draft! We really appreciate the effort!

Fixed in 2.8

Was this page helpful?
0 / 5 - 0 ratings