var inputParameters = setDefaultParameters(argumentCollection=arguments); var currentValue = arguments.value; // the field's current value var category = ""; var callBackFunct = ""; if (StructKeyExists(Request.Params, 'category')) category = Request.Params.category; if (StructKeyExists(Request.Params, 'callBack')) callBackFunct = Request.Params.callBack; renderJSFunctions(argumentCollection=arguments); var inputParameters = Duplicate(arguments.parameters); var appConfig = application.ptPhotoGallery.getAppConfig(); var uploadFormURL = ''; var loadScriptJS = ''; // Get the UPLOAD FORM URL from the App Configuration if ( StructKeyExists(appConfig,"UPLOAD_FORM_URL") AND LEN(TRIM(appConfig.UPLOAD_FORM_URL)) ) uploadFormURL = application.ADF.csData.parseCSURL(appConfig.UPLOAD_FORM_URL); // Load the inline JavaScript after the libraries have loaded application.ptPhotoGallery.scripts.addFooterJS(loadScriptJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY var inputParameters = Duplicate(arguments.parameters); if( NOT StructKeyExists(inputParameters, "photoCategory") OR (NOT LEN(inputParameters.photoCategory)) ) inputParameters.photoCategory = ""; if( NOT StructKeyExists(inputParameters, "catFldName") OR (NOT LEN(inputParameters.catFldName)) ) inputParameters.catFldName = ""; if( NOT StructKeyExists(inputParameters, "includeImgGalleryFldName") OR (NOT LEN(inputParameters.includeImgGalleryFldName)) ) inputParameters.includeImgGalleryFldName = ""; return inputParameters; private any function getValidationJS(required string formName, required string fieldName, required boolean isRequired) { if (arguments.isRequired) return '#arguments.fieldName#validatePhoto()'; return ""; } private string function getValidationMsg() { return "Please upload a Photo."; } public string function getResourceDependencies() { return listAppend(super.getResourceDependencies(), "jQuery,ADFLightbox"); } public string function loadResourceDependencies() { application.ptPhotoGallery.scripts.loadJQuery(); application.ptPhotoGallery.scripts.loadADFLightbox(); }