// initialize some of the attributes variables typeid = attributes.typeid; prefix = attributes.prefix; formname = attributes.formname; currentValues = attributes.currentValues; if( not structKeyExists(currentValues, "photoCategory") ) currentValues.photoCategory = ""; if( not structKeyExists(currentValues, "catFldName") ) currentValues.catFldName = ""; if( not structKeyExists(currentValues, "includeImgGalleryFldName") ) currentValues.includeImgGalleryFldName = ""; // Get the data for the Photo Categories photoCatDataArray = application.ptPhotoGallery.photoDAO.getCategories(); fieldProperties['#typeid#'].paramFields = "#prefix#photoCategory,#prefix#catFldName,#prefix#includeImgGalleryFldName"; // allows this field to support the orange icon (copy down to label from field name) fieldProperties['#typeid#'].jsLabelUpdater = '#prefix#doLabel'; // allows this field to have a common onSubmit Validator fieldProperties['#typeid#'].jsValidator = '#prefix#doValidate'; // handling the copy label function function #prefix#doLabel(str) { document.#formname#.#prefix#label.value = str; } function #prefix#doValidate() { if( (document.getElementById('#prefix#photoCategory').value.length == 0) && (document.getElementById('#prefix#catFldName').value.length == 0) ) { alert('Please select a Default Photo Category or specify the Photo Category Field Name'); return false; } if( (document.getElementById('#prefix#photoCategory').value.length > 0) && (document.getElementById('#prefix#catFldName').value.length == 0) ) { alert('Please enter the Photo Category Field Name'); return false; } return true; }
Default Photo Category:
Photo Category Field Name:
Please enter the category field name in the Element.

Include Image Gallery Field Name:
If using the Image Gallery, enter the field name for the Include in Image Gallery field.