// Variable for the version of the field - Display in Props UI. fieldVersion = "2.0.4"; // initialize some of the attributes variables typeid = attributes.typeid; prefix = attributes.prefix; formname = attributes.formname; currentValues = attributes.currentValues; // Setup the default values defaultValues = StructNew(); defaultValues.defaultText = "This is the defaulted text"; defaultValues.uiTheme = "ui-lightness"; // This will override the current values with the default values. // In normal use this should not need to be modified. defaultValueArray = StructKeyArray(defaultValues); for(i=1;i<=ArrayLen(defaultValueArray);i++){ // If there is a default value to exists in the current values // AND the current value is an empty string // OR the default value does not exist in the current values if( ( StructKeyExists(currentValues, defaultValueArray[i]) AND (NOT LEN(currentValues[defaultValueArray[i]])) ) OR (NOT StructKeyExists(currentValues, defaultValueArray[i])) ){ currentValues[defaultValueArray[i]] = defaultValues[defaultValueArray[i]]; } } // Load JQuery application.ADF.scripts.loadJQuery(noConflict=true);
UI Theme:

ADF Custom Field v#fieldVersion#