Untitled
unknown
plain_text
2 years ago
1.3 kB
9
Indexable
// OnChange event handler for the email field
function onEmailFieldChange(executionContext) {
var formContext = executionContext.getFormContext();
// Get the value of the email field
var emailFieldValue = formContext.getAttribute("emailfieldname").getValue();
// Set CreaContatto field to visible when email field has value
var creaContattoField = formContext.getControl("creacontattofieldname");
if (emailFieldValue) {
creaContattoField.setVisible(true);
} else {
creaContattoField.setVisible(false);
}
}
// OnChange event handler for the CreaContatto field
function onCreaContattoFieldChange(executionContext) {
var formContext = executionContext.getFormContext();
// Get the value of the CreaContatto field
var creaContattoFieldValue = formContext.getAttribute("creacontattofieldname").getValue();
// Trigger an action called CreaContattoAct when CreaContatto is set to Yes
if (creaContattoFieldValue === true) {
// Call the action or perform any other desired action
CreaContattoAct();
}
}
// Function to perform the CreaContattoAct action
function CreaContattoAct() {
// Implement the logic for the CreaContattoAct action here
console.log("CreaContattoAct action triggered");
}Editor is loading...
Leave a Comment