Expand my Community achievements bar.

SOLVED

How to block form submission or not depend on some conditions?

Avatar

Level 3

I know the "submitStart" event of GuideBridge object, but it cannot block the submit. Anyone know the method to do this? I want to retrieve some data form backend before submit and after the data successfully retrieved, then submit.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@fulongt37334138 

Couple of suggestions:

- You can write your own custom submit action[0], retieve the data and after validation, perform the desired submit action.

- You can add a rule before the actual submit (guideBridge.submit()) to make an AJAX call to retrieve the data and submit the form, based on a condition.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-65/forms/customize-aem-forms/custom-submi... 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

@fulongt37334138 

Couple of suggestions:

- You can write your own custom submit action[0], retieve the data and after validation, perform the desired submit action.

- You can add a rule before the actual submit (guideBridge.submit()) to make an AJAX call to retrieve the data and submit the form, based on a condition.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-65/forms/customize-aem-forms/custom-submi...