You are here

function CampaignMonitor::listCreateCustomField in Campaign Monitor 6.2

Same name and namespace in other branches
  1. 5.2 lib/CMBase.php \CampaignMonitor::listCreateCustomField()
  2. 6.3 lib/CMBase.php \CampaignMonitor::listCreateCustomField()

*

Parameters

Non-displayable characters.

File

lib/CMBase.php, line 1434

Class

CampaignMonitor
The new CampaignMonitor class that now extends from CMBase. This should be backwards compatible with the original (PHP5) version.

Code

function listCreateCustomField($list_id, $fieldName, $dataType, $options) {
  if ($dataType == 'Text' || $dataType == 'Number') {
    $options = null;
  }
  return $this
    ->makeCall('List.CreateCustomField', array(
    'params' => array(
      'ListID' => $list_id,
      'FieldName' => $fieldName,
      'DataType' => $dataType,
      'Options' => $options,
    ),
  ));
}