execute a javascript function when a form is submitted and validated

Confluence User - 13 Aug, 2020

I want to execute a javascript function when a form is submitted and validated.

Is it possible to check if all fields are validated using javascript (ex: Mandatory Fields are filled)


form;submitted;submission;javascript;validation;validate

2


13 Aug, 2020
confluenceUser
confluenceUser

Hi, you can place any custom JavaScript in a <script> tag in a Custom HTML element in your form, so yes you can add your JavaScript code for validation. For typical validation such as mandatory field checking, you don't actually need custom code and you can just use existing validators like the Default Validator.

13 Aug, 2020
confluenceUser
confluenceUser

I want to execute a javascript script when the complete button is clicked and all fields are validated

Ex: script : alert("submitted")
$("#Form1").submit(function( event ){
alert("submitted")
});

In this code when the complete button is clicked the alert will be executed even if not all the fields are validated 

Is there a code to check if joget validations are true or I must check every field if is validated

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print