Create Container Code

The Container will have elements inside. It can be a Panel, a Panel with a Title, or just a Container.

&WWPFormElement = New()
&WWPFormElement.WWPFormElementTitle = "Main Information"
&WWPFormElement.WWPFormElementId = &WWPFormElementId
&WWPFormElement.WWPFormElementType = WorkWithPlus.DynamicForms.WWP_DF_ElementType.Container
&WWPFormElement.WWPFormElementDataType = WorkWithPlus.DynamicForms.WWP_DF_DataType.Character
&WWPFormElement.WWPFormElementCaption = WorkWithPlus.DynamicForms.WWP_DF_ElementCaptionType.Label

&WWP_DF_ContainerMetadata = New()
&WWP_DF_ContainerMetadata.Collapsable = True
&WWP_DF_ContainerMetadata.CollapsedByDefault = False
&WWP_DF_ContainerMetadata.Columns = 2
&WWP_DF_ContainerMetadata.Style = WorkWithPlus.DynamicForms.WWP_DF_ContainerMetadata_Style.PanelWithTitle
&WWPFormElement.WWPFormElementMetadata = &WWP_DF_ContainerMetadata.ToJson()

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

For each different element, there is an SDT where you can set its metadata. For the Container, the metadata is the following:

ContainerMetadata