Contact Us
×

Overview

Zigaform events let you launch actions based on a action performed by a user.

“zgfm.form.init_loaded” event

This event is fired just after the form is loaded

jQuery( document ).ready(function($) {

$(document).bind("zgfm.form.init_loaded", function(e,data) {

$('body').css('background','red'); alert('Added red to background');

});

});

“zgfm.form.before_submit”callback event

This event is fired just before the form submit the data:

jQuery( document ).ready(function($) {

  $(document).bind("zgfm.form.before_submit", function(e,callback) {

    if(true){

      callback({
      is_valid:true
      });

    }else{

      callback({
      is_valid:false
      });

    }

  });

});

when your process is fine, return the callback function:

callback({
is_valid:true
});

if your process is not fine, return the callback function with “is_valid” parameter to false:

callback({
is_valid:false
});

Note, remember to return always the callback function as shown in the example.

if you return callback function with parameter “is_valid”  to false, the form will not send they data, until it receive callback function with “is_valid” parameter to false.

“additional_validation.form”callback event

This event is fired just after validation and return a callback function

jQuery( document ).ready(function($) {
  $(document).bind("zgfm.form.wizbtn_additional_validation", function(e,callback) {
    if(true){
      callback({
      is_valid:true
      });
    }else{
      callback({
      is_valid:false
      });
    }
  });
});

when your validation is fine, return the callback function:

callback({
is_valid:true
});

if your validation is not fine, return the callback function with “is_valid” parameter to false:

callback({
is_valid:false
});

Note, remember to return always the callback function as shown in the example.

“zgfm.form.after_submit” event

This event is fired just after the form sent information

jQuery( document ).ready(function($) {
  $(document).bind("zgfm.form.after_submit", function(e,data) {
    $('body').css('background','red'); alert('Added red to background');
  });
});