studio version 11.6.1

web application.

i am facing an issue with AJAX submit button, i have a save action that contains ajax refresh in it.

When i set the validation of the button to Client & server the action will not be executed.

I have tried to put a break point to debug but nothing is happening when i click on the button.

If i change the validation to Server only or None the action will run normally.


Hi elie,


Do you have mandatory input fields on the page that contains the button? And these mandatory input fields are empty when you press the button?


Because if you have empty mandatory input fields and a button with validation client and server, before the action is triggered, a validation will be made to make sure that all the mandatory input fields are not empty.


Regards

Hi,

For Client & server  validation:
The validation of inputs is performed on the client side. If the validation fails then these values are not submitted to the server. The request is cancelled and the corresponding validation message is displayed. If the typed values are valid then the request proceeds and validations will be done in the server. Client side checks mandatory fields and data types.

Regards

Hi Elie.

Please check the elements of your page, there should be a mandatory field empty or with wrong values.
These inputs are validated even if hidden but present in the html.

More details here:
https://www.outsystems.com/forums/discussion/32973/client-side-validation-do-not-stop-calling-action-if-input-is-hidden-displaynon/

When setting the validation for server only, you can debug and confirm if one of your forms is valid or not.


Regards

Hi @elie elias

 yes its happening for you because you have mandatory inputs in your page i think , for that reason its not able to submit to the server, in order to trigger server action to submit you have two option , a.fill the mandatory fields in the page or b.Set the mandatory filed to False in this way you can trigger your action.

I hope this helps you ,

Thank you,

Regards,

Shree

I have two pages, that contains the same issue one of them has some mandatory fields and the other not.

The issue is happening in both even the mandatory fields are filled or not.

When the mandatory fields are empty, a message should appear or focus on the required fields, right ? this also is not happening

Bruno Marques wrote:

Hi elie,


Do you have mandatory input fields on the page that contains the button? And these mandatory input fields are empty when you press the button?


Because if you have empty mandatory input fields and a button with validation client and server, before the action is triggered, a validation will be made to make sure that all the mandatory input fields are not empty.


Regards



Could you please share the oml?