Customization - Jquery events
List of events :
- postSubmit.openform
- postRender.openform
Example
$(document).on("postSubmit.openform", function (event, data, moduleid, sf) {
alert(JSON.stringify(data, null, " "));
});
$(document).on("postRender.openform", function (event, control, moduleid, sf ) {
var emailField = control.childrenByPropertyId["Email"];
emailField.setValue("[email protected]");
emailField.on("change", function () {
alert(emailField.getValue());
});
emailField.options.validator = function (callback) {
var value = this.getValue();
//var age = this.getParent().childrenByPropertyId["age"].getValue();
if (value.length > 20) {
callback({
"status": false,
"message": "Too long!"
});
return;
}
callback({
"status": true
});
}
});
Updated about 6 years ago