Pixelsilk API function to add a value to a field's values--requires the advanced-admin-access permission
pageTypeId: the page type's unique identifier
fieldId: the field's unique identifier
listValue: the field's value
listText: the field's display text

The function addPageTypeFieldValue returns an item list properties object containing the page type field where this propery belongs, the list text, the list value, the list order, whether it is the default, and whether it is selected

C# Example:
Guid pageTypeId = <page type's id>;
Guid fieldId = <field's id>;
string listValue = "valueOfField";
string listText = "displayTextOfField";
object itemListPropeties = AddPageTypeFieldValue(pageTypeId, fieldId, listValue, listText);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/addPageTypeFieldValue HTTP/1.1
Content-Length: 291
Content-Type: application/x-www-form-urlencoded
Cookie: auth=27B07165257D...B948556AE44B

Request Data:
Unencoded Data:
   "listText":"Here is an example."

Url-encoded Data:

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=E2A48C7E4B81...97BC497DC71; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 100

Response Data:
{"id":"f21c5aa0-f672-4379-8510-048157a7a19f","listText":"Here is an example.","listValue":"Example"}

JavaScript Example:
Method Call:
pixelsilk2.addPageTypeFieldValue(input, callback);

Input Object:
    listText:"Here is some example text."

Returned Data:
    "listText":"Here is some example text.",

Back to Page Types »