application.ADF.scripts.loadJQuery(noConflict=true);
// Variable for the version of the field - Display in Props UI.
fieldVersion = "2.0.1";
// 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.pageLayoutScript = defaultScriptText();
//defaultValues.defaultText = "This is the defaulted text";
//defaultValues.useUdef = 0;
//defaultValues.defaultValue = "";
//This will override the default values with the current values.
//In normal use this should not need to be modified.
currentValueArray = StructKeyArray(currentValues);
for(i=1;i<=ArrayLen(currentValueArray);i++){
//If there is a default value set AND there is a current value set update the default value with the current value
if( StructKeyExists(defaultValues,currentValueArray[i]) AND LEN(TRIM(currentValues[currentValueArray[i]])) )
{
defaultValues[currentValueArray[i]] = currentValues[currentValueArray[i]];
}
}
// Get the cfmlEngine type
cfmlEngine = server.coldfusion.productname;
if ( !FindNoCase(cfmlEngine,'ColdFusion Server') )
{
// For Lucee Inject Extra linebreaks before each open bracket (since the textarea removes them)
defaultValues.pageLayoutScript = REReplace(defaultValues.pageLayoutScript, "(\r\n|\n\r|\n|\r)(\[)","#013;#010;#013;#010;[", "all");
defaultValues.pageLayoutScript = REReplace(defaultValues.pageLayoutScript, "(\r\n|\n\r|\n|\r)(##\[)","#013;#010;#013;#010;##[", "all");
}
application.ADF.scripts.addHeaderCSS(cftHeaderCSS,"TERTIARY");
application.ADF.scripts.addFooterJS(cftFooterJS,"TERTIARY");
Enter PageLayoutScript configuration syntax to generate Page Layout Options.