Form structure and editing

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 (Control).
 
Creating a form in DataWeb
To create a form, access the relevant DataWeb section and set a new Item.
The form, like many DataWeb objects, is nothing more than an item specialized for data uploading.
It's interesting to note that to create new forms, some system ones such as Form_Form and Form_Control are used.
In practice, the DataWeb structure allows the creation of new forms through the existing ones. 
 
Naming rules for the form
The name of the form must be unique and must start with the prefix "Form_" (for example "Form_Product").
The name of the reference item should be singular (Form_Category), so Form_Categories is wrong.
Names (Name) in DataWeb are always PascalCase without spaces or special characters.
 
Adding controls
To add a control, specify the type by choosing from the predefined ones. Each type enables or disables the relevant properties. For instance, the TextBox type allows setting the reference data field while the Title type, being read-only, does not offer it.
Each control is saved in Json format inside 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
	}
]
 
It's possible to copy and paste control structures between forms to simplify the creation process. The only precaution to take is to copy and paste Json between DataWeb forms in database fields but never between form and database: the two structures are slightly different and problems could arise.
 
Naming rules for the control
The control's name (Name) must be PascalCase and unique in the form.
If it's linked to a field in the database, it has the same name (for example "Title").
Like the fields in the database, it's singular if it contains only one value ("Category") and plural if it contains many in Csv or Json format ("RelatedCategories").
 
Once saved, it's possible to associate the form with a section to enable content uploading.
 
Form integration