How can I do form validation in a modal window?

rnd-kumano
Tera Contributor

Hi all.
I am creating an application in AppEngineStudio and am using modal windows to display forms.
Using the UI Builder's event mapping "Open or close modal dialog" (open), with the specification that clicking on a record in the list will open the form for that record,
In addition, the update process is implemented by mapping the "save" event to the submit button in the modal window and the "Open or close modal dialog" (close) event.

 

When an invalid value is entered into a field in this form and submitted, we would like the modal window to display an error message instead of closing, but the modal window actually closes.

 

I think that the event mapping for the submit button should not be just "save" but asynchronously get the result of the validation check, and if it is true, do current.update() and close the modal, and if false, display the error message without closing the modal. If false, the modal is not closed and the error is displayed.
However, I do not know how to do this.

 

Any advice on this issue would be appreciated.

If you need additional information, please let me know.

0 REPLIES 0