Posted: 16 Oct 2020 11:06 EDT Last activity: 6 Nov 2020 14:25 EST
After validation fail on modal window, then when user re-enters text in input field, submit button does not work on first click
After validation fail, when user re-enters text in input field then presses submit button for the first time, it clears the error message on screen but does not submit the form. They must press submit a second time in order for it to work. Alternatively, they can click anywhere outside the input field then click submit once and it will work.
User enters incorrect details -> error message appears on screen -> user enters correct details -> presses submit (or anywhere else outside the text input field) -> error message clears but form remains open -> presses submit -> form submits
I have tried creating an action set for change > clear messages and post value. I have also tried an action set of change > set focus but this has not worked. Does anyone have any other suggestions? Many thanks
If you have configured the onChange event on the Input elements and trying to click the button without moving the focus away then it will not work, because the priority is given to Onchange event and it will not let form submit.
Try to remove any onchange configurations on the Input elements and verify the behaviour.
Posted: 2 months ago
Updated: 2 months ago
Posted: 6 Nov 2020 10:30 EST Updated: 6 Nov 2020 14:25 EST
Thank you very much for your responses. I originally did not have any onChange configurations (I didn't have any action sets) and I had the same scenario. I then added the onChange in an attempt to change the focus. However, your explanation about the priority given makes sense and I have removed. The problem is that when the user types (after failed validation) in the field to re-enter information, the focus stays in the field. The user then has to click outside the field before clicking the submit button in order for it to work. I will also check out Rett's suggestion of another refresh that could be taking place.