addItem()

Overview

public string function addItem(
      required string formId       
    , required string itemType     
    , required struct configuration
    ,          string question      = ""
)

Adds a new item to the form. Returns the ID of the newly generated item

Arguments

NameTypeRequiredDescription
formIdstringYesID of the form to which to add the new item
itemTypestringYesID of the item type, e.g. 'content' or 'textarea', etc.
configurationstructYesStructure of configuration options for the item
questionstringNo (default="")