application.ADF.scripts.loadJQuery(noConflict=true); // Variable for the version of the field - Display in Props UI. fieldVersion = "2.0.5"; // 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]]; } } if ( not StructKeyExists(attributes.currentValues, "defaultValue") ) attributes.currentValues.defaultValue = ""; if ( not StructKeyExists(attributes.currentValues, "useUdef") ) attributes.currentValues.useUdef = 0; if ( not StructKeyExists(attributes.currentValues, 'cookieField') ) attributes.currentValues.cookieField = ''; application.ADF.scripts.addFooterJS(cftFooterJS,"TERTIARY");
UI Theme:

ADF Custom Field v#fieldVersion#