This project was built with AngularJS
- Include NgInput Js File
<script src="Resources/nginput/ngInputElement.js"></script>
<script src="Resources/nginput/ngInputForm.js"></script>
- Define the configuration in JS File
$scope.formdata = {
name: "testForm",
sections: [
{
title: "My Section",
id: "section1",
columns: "2",
elements: [
$scope.textField = {
"name": "name",
"displayName": "What is name of Agreement?",
"options": [],
"type": 0,
"modelName": "name",
"isSearchable": false,
"lookupEntityName": null,
"lookupDisplayName": null,
"lookupDiscName": null,
"isRequired": false,
"hideCondition": "false",
"showCondition": "true",
"requiredCondition": "true",
"disableCondition": "false",
"validationRule": null,
"defaultValue": "Hello",
"minLength": null,
"maxLength": null,
"validationMsg": null,
"value": null,
multiple: true,
"rowNo": 1,
"columnNo":1
};
$scope.amount = {
"type": 1,
"inputFieldType": 1,
"id": "amount",
"name": "amount",
"modelName": "amount",
"displayName": "Amount",
defaultValue : 100,
"value": null,
"rowNo": 1,
"columnNo": 2,
"requiredCondition" : "true"
}
]
}
]
};- Add to HTML
<ng-input-form name="{{formdata.name}}" ng-if="isInline" sections="formdata.sections" configdata="dataEdit"></ng-input-form>
##ngForm Options
-
name- Form Name -
configdata- Configuration with Property inlineMode : Boolean to specify form will support inline Edit or Not -
sections- List of Section with elements
##elements Options
type- 0 - 9 depend on typeid-Id of input Elementname- Name Of ElementmodelName- Name of Model to BinddisplayName- LabelOptions- List Of Options for Picklist and AutoCompleteisSearchable- For PicklistisRequired- Required FlaghideCondition- Dynamic Hide ConditionshowCondition- Dynamic Show ConditionrequiredCondition- Dynamic Required ConditiondisableCondition- Dynamic Disabled ConditionvalidationRule- Validation RuledefaultValue- Dafaut ValueminLength- Min LengthmaxLength- Max LengthvalidationMsg- Validation Message
##Type List 0 - Text 1 - Number 2 - Date 3 - Picklist(Select) 4 - Checkbox 5 - Radio 6 - None 7 - AutoComplete 8 - Swicth 9 - Slider 10 - Chips