public function listMergeVarAdd(string
$id,
string
$tag,
string
$name,
[array
$options = ] )
Parameters
$id
—
string
the list id to connect to. Get by calling lists()
$tag
—
string
The merge tag to add, e.g. FNAME. 10 bytes max, valid characters: "A-Z 0-9 _" no spaces, dashes, etc.
$name
—
string
The long description of the tag being added, used for user displays
$options
—
array
optional Various options for this merge var. <em>note:</em> for historical purposes this can also take a "boolean" string field_type optional one of: text, number, radio, dropdown, date, address, phone, url, imageurl, zip, birthday - defaults to text boolean req optional indicates whether the field is required - defaults to false boolean public optional indicates whether the field is displayed in public - defaults to true boolean show optional indicates whether the field is displayed in the app's list member view - defaults to true int order The order this merge tag should be displayed in - this will cause existing values to be reset so this fits string default_value optional the default value for the field. See listSubscribe() for formatting info. Defaults to blank array choices optional kind of - an array of strings to use as the choices for radio and dropdown type fields string dateformat optional only valid for birthday and date fields. For birthday type, must be "MM/DD" (default) or "DD/MM". For date type, must be "MM/DD/YYYY" (default) or "DD/MM/YYYY". Any other values will be converted to the default. string phoneformat optional "US" is the default - any other value will cause them to be unformatted (international) string defaultcountry optional the <a href="http://www.iso.org/iso/english_country_names_and_code_elements" target="_blank">ISO 3166 2 digit character code</a> for the default country. Defaults to "US". Anything unrecognized will be converted to the default.
Returns
bool
true if the request succeeds, otherwise an error will be thrown