Thank you, but its not the cause for my issue.
I am writing my JavaScript code below again, because in my original thread the green color is making blur in visibility,
xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).ui.oneOfChild.border.fill.color.value = "192,192,192"
xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).access = "readOnly";
I have a scenario that: I have around 200 fields on the form, and these field properties/attributes (mandatory, grey, editable, option) are dynamic, meaning, the back end SAP's data base's interface/data view will decide whether its mandatory or optional....meaning, say, for US the field_1 is mandatory , but the same field is optional for Canada, like, they are dynamic, to achieve this i did like below
I wrote the below code in docReady event at root level, i mean for form level (MY_FORM_VISITOR level), pls. note there are 2 dots after 'MY_FORM_VISITOR' in my JS
// Identify all the non-editable fields and make them grey
var myArrayGrey = new Array();
var greyFields;
greyFields = xfa.resolveNode("MY_FORM_VISITOR.Page1.TMReference.HiddenSub1CustInfo1.GREfields").rawValue
myArrayGrey = greyFields.split(" ");
for (var i = 0; i < myArrayGrey.length; i++)
{
xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).ui.oneOfChild.border.fill.color.value = "192,192,192"
xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).access = "readOnly";
};
In the above,
The 'GREYfields' is a invisible text field on the form, holds a string data type and its prepopulated with below value, just for for example, say
NAME1 NAME2 STREET CITY ZIPCODE STATE COUNTRY so on....
Any inpurs pls.?
THANK YOU