Create Label Code

The Code for adding a Label is the following:

&WWPFormElementParentTitle = "Additional Information"
Do 'GetParentIdFromTitle'
&WWPFormElement = New()
&WWPFormElement.WWPFormElementId = &WWPFormElementId
&WWPFormElement.WWPFormElementTitle = "This information is confidential, and it won't be shared with anyone"
&WWPFormElement.WWPFormElementType = WorkWithPlus.DynamicForms.WWP_DF_ElementType.Label
&WWPFormElement.WWPFormElementDataType = WorkWithPlus.DynamicForms.WWP_DF_DataType.Character

&WWP_DF_LabelMetadata = New()
&WWP_DF_LabelMetadata.Style = WorkWithPlus.DynamicForms.WWP_DF_LabelMetadata_Style.Text

&WWPFormElement.WWPFormElementMetadata = &WWP_DF_ElementsRepeaterMetadata.ToJson()

&WWPFormElement.WWPFormElementParentId = &WWPFormElementParentId
&WWPForm.Element.Add(&WWPFormElement)
&WWPFormElementId += 1

The metadata for the Label is the following:

DynamicFormLabelMetadata