Back to Documentation Overview
listMergeVarAdd
public static listMergeVarAdd(string apikey, string id, string tag, string name, array req)
Add a new merge tag to a given list
- Section:
- List Related
- Parameters:
apikey a valid API Key for your user account. Get by calling login() id the list id to connect to. Get by calling lists() tag The merge tag to add, e.g. FNAME name The long description of the tag being added, used for user displays req optional - Various options for this merge var. note: for historical purposes this can also take a "boolean" string field_type optional - one of: text, number, radio, dropdownn, date, address, phone, url, imageurl - 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 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 - Returns:
- bool - true if the request succeeds, otherwise an error will be thrown
- <?php
- /**
- This Example shows how to add an Merge Variable to a list using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.inc.php';
- try {
- $result = $client->listMergeVarAdd($apikey, $listId, 'TEST','Testing', false);
- } catch (XML_RPC2_FaultException $e){
- }
Examples (1)
download example code[1] xml-rpc_listMergeVarAdd.php
|
Add New Note
User Contributed Notes for
listMergeVarAdd |
|---|
| No notes, yet... Will you be the first?? |