// Load JQuery to the script application.ADF.scripts.loadJQuery(); // the fields current value currentValue = attributes.currentValues[fqFieldName]; // the param structure which will hold all of the fields from the props dialog xparams = parameters[fieldQuery.inputID]; if ( NOT StructKeyExists(xparams, "fldClass") ) xparams.fldClass = ""; if ( NOT StructKeyExists(xparams, "fldName") ) xparams.fldName = fqFieldName; else if ( LEN(TRIM(xparams.fldName)) EQ 0 ) xparams.fldName = ReplaceNoCase(xParams.fieldName,'fic_',''); // Set the value that is stored when the checkbox is checked if ( NOT StructKeyExists(xparams, "checkedVal") ) xparams.checkedVal = "yes"; // Set the value that is stored when the checkbox is checked if ( NOT StructKeyExists(xparams, "uncheckedVal") ) xparams.uncheckedVal = "no"; // Set the field ID from the field name xparams.fldID = TRIM(xparams.fldName); // Get the DataPageID to see if this is a form to create a new record or update an existing record // 0 = new record and greater than 0 = existing record formDataPageID = 0; if ( StructKeyExists(attributes,"LayoutStruct") AND StructKeyExists(attributes.LayoutStruct,"UDFPAGEID") ) formDataPageID = attributes.LayoutStruct.UDFPAGEID; if ( LEN(TRIM(currentValue)) LTE 0 ) { currentValue = xparams.uncheckedVal; //'no' // If no value and this is a new record then use the defaulted value if ( formDataPageID EQ 0 AND xparams.defaultVal EQ "yes" ) currentValue = xparams.checkedVal; //'yes' } // Set defaults for the label and description includeLabel = true; includeDescription = true; //-- Update for CS 6.x / backwards compatible for CS 5.x -- // If it does not exist set the Field Permission variable to a default value if ( NOT StructKeyExists(variables,"fieldPermission") ) variables.fieldPermission = ""; //-- Read Only Check w/ cs6 fieldPermission parameter -- readOnly = application.ADF.forms.isFieldReadOnly(xparams,variables.fieldPermission);
class="#xparams.fldClass#" value='yes' readonly="true">
#application.ADF.forms.wrapFieldHTML(inputHTML,fieldQuery,attributes,variables.fieldPermission,includeLabel,includeDescription)#