Create Elements Repeater Element Code

You can create a Grid Elements Repeater or a Plain Elements Repeater. Then, in the repeater, you need to insert the elements.

The metadata for the elements repeater is the following:

DynamicFormElementsRepeaterMetadata

Grid Elements Repeater

Inside the grid repeater, you can insert only simple elements.

&WWPFormElementParentTitle = "Emails"
Do 'GetParentIdFromTitle'
&WWPFormElement = New()
&WWPFormElement.WWPFormElementId = &WWPFormElementId
&WWPFormElement.WWPFormElementTitle = "Emails"
&WWPFormElement.WWPFormElementType = WorkWithPlus.DynamicForms.WWP_DF_ElementType.ElementsRepeater
&WWPFormElement.WWPFormElementDataType = WorkWithPlus.DynamicForms.WWP_DF_DataType.Character

&WWP_DF_ElementsRepeaterMetadata = New()
&WWP_DF_ElementsRepeaterMetadata.RepetitionsDataType = WorkWithPlus.DynamicForms.WWP_DF_ElementsRepeater_Type.Grid
&WWP_DF_ElementsRepeaterMetadata.RepetitionsType = WorkWithPlus.DynamicForms.WWP_DF_ElementsRepeater_Repetitions.AddedByUser
&WWP_DF_ElementsRepeaterMetadata.Repetitions_UserAdded.InsertChildCaption = "Add email"
&WWP_DF_ElementsRepeaterMetadata.Repetitions_UserAdded.RemoveChildTooltip = "Remove email"
&WWP_DF_ElementsRepeaterMetadata.Repetitions_UserAdded.MaxRepetitions = 5

&WWPFormElement.WWPFormElementMetadata = &WWP_DF_ElementsRepeaterMetadata.ToJson()

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

Plain Elements Repeater

Inside the plain repeater, you can insert containers, labels, and simple elements.

The difference in the code is that you have to set the type to Plain:

&WWP_DF_ElementsRepeaterMetadata.RepetitionsDataType = WorkWithPlus.DynamicForms.WWP_DF_ElementsRepeater_Type.Plain