Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

exclusion group validation

Avatar

Level 1

Hi All,

I am trying to highlight an exclusion group when it doesn't have any button checked. This is the script for the validation. Is it possible to check against the value of the exclusion group?

Thanks.

var reqFillColor = "255.255.0";

var nonReqFillColor = "255.255.255";

function requiredValidation()

{

var emptyArr = new Array();

if(xfa.form.form1.subform1.rbList.rawValue == null)

{

emptyArr.push(xfa.form.form1.subform1.rbList);

highlight(xfa.form.form1.subform1.rbList);

}

function highlight(fld)

{

if(fld.ui.checkButton)

{

fld.ui.checkButton.border.fill.color.value = reqFillColor;

}

}

function unhighlight(fld)

{

if(fld.ui.checkButton)

{

fld.ui.checkButton.border.fill.color.value = nonReqFillColor;

}

}

var successFlag = true;

if(emptyArr.length > 0)

{

successFlag = false;

xfa.host.messageBox("Please fill out all the required fields that are hightlighted in yellow", "Missing Required Fields", 1.0);

xfa.host.setFocus(emptyArr[0]);
}else

{

successFlag = true;

xfa.host.messageBox("Thank you, all Required Fields are Completed");

}

return successFlag;

}

0 Replies