Structure and creation of a form

The Form object allows the user to enter the data of an item in a specific DataWeb section.
Each form is defined by a name and a collection of highly customizable controls.
 
Creating a Form in DataWeb
To create a form, you go to its DataWeb section and set a new Item.
The form, like many DataWeb objects, is nothing more than a specialized item for loading data.
 
Interestingly, you use some system forms like Form_Form and Form_Control to create new forms.
In practice, the DataWeb structure allows you to create new forms through existing ones. 
 
Naming rules for the form
The form name must be unique and must begin with the prefix "Form_" (for example, "Form_Product").
The name of the reference item must be put in the singular (Form_Category), so it is Form_Categories incorrect.
Names in DataWeb are always PascalCases with no spaces or special characters.
 
Adding Controls
To add a control, you must specify the type from the predefined controls. Each type turns the relevant properties on or off. For example, the TextBox type allows you to set the reference data field while the Title type, being read-only, does not propose it.
Each control is saved in Json format within the Controls field of the Form object.
 
Form edit
 
Saving this control generates the following Json data structure:
 
[
	{
		"name": "Title",
		"title": [
			{
				"culture": "en-US",
				"value": "Title"
			},
			{
				"culture": "it-IT",
				"value": "Titolo"
			}
		],
		"type": "TextBox",
		"dataField": "Title",
		"dataType": "String",
		"isVisible": true,
		"isVersionLinked": false,
		"isReadOnly": false,
		"isRequired": false,
		"isLateDataBinding": false,
		"isVisibleRoles": false,
		"isModified": false
	}
]
 
You can copy and paste control structures between forms to simplify the authoring process. The only precaution to be taken is to copy and paste Json between DataWeb forms between database fields but never between forms and databases: the two structures are slightly different and there could be problems.
 
Naming rules for auditing
The name of the control must be PascalCase and unique on the form.
If it's hooked to a field in the database, it has the same name (for example, "Title").
As with the fields in the database, it is singular if it contains only one value ("Category") and plural if it contains many in Csv or Json format ("RelatedCategories").
 
Once saved, you can associate the form with a section to trigger content loading.
 
Form integration