Add Custom Control Members as White List for Check syntax validations
- Last UpdatedNov 15, 2023
- 1 minute read
To add custom control members as whiteList for Check syntax validations
-
Open the Skelta.CustomControlsMembers.js file from BPMUITemplates\Default\NextGenForms\app\custom\
-
Uncomment the self invoking function.
(function ()
{
var standardControlMembers = skelta.forms.constants.controlsCollection;
var genericControlFunctions = skelta.forms.constants.controlFunctions;//genericControlFunctions has properties - nonContainerFunctions and containerFunctions which is a collection
of function names [{ name: "functionName"}]var customControlMembers = {
functions: genericControlFunctions.nonContainerFunctions,//.concat([{ name: "functionName" }
isContainerControl: false,
controlType: "ToolBar",
properties: [{ propertyName: "xmlNodeBoundTo", propertyType: "2", isWritable: false },
{ propertyName: "tagName", propertyType: "0", isWritable: true },
{ propertyName: "id", propertyType: "2", isWritable: false },
{ propertyName: "value", propertyType: "0", isWritable: true },
{ propertyName: "isMandatory", propertyType: "0", isWritable: true },
{ propertyName: "readOnly", propertyType: "0", isWritable: true },
{ propertyName: "enable", propertyType: "0", isWritable: true },
{ propertyName: "resizable", propertyType: "0", isWritable: true },
{ propertyName: "visible", propertyType: "0", isWritable: true }]
}
standardControlMembers.push(customControlMembers);
})();
-
In the code:
-
The genericControlFunctions has the properties, nonContainerFunctions and containerFunctions which are a collection of function names - [{ name: "functionName"}].
-
controlType is the name of the custom control.
-
-
Use the customControlMembers object as per the custom control by adding properties to the properties array.
-
propertyName is the name of the property.
-
propertyType is "0" for observable, "1" for observableArray and "2" for nonObservable.
-
isWritable is true or false - depending on whether the property is assignable or readonly.
-
-
Push the customControlMembers to the standardControlMembers collection.
For examples on adding "MaskedInput" and "Barchart" properties for Check syntax validations, see the Adding Masked Input Property for Check Syntax Validation and Adding Barchart Properties for Check Syntax Validations topics respectively.