updatePageTypeFieldValue()

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

Output:
The function updatePageTypeFieldValue returns void.

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

HTTP Example:
Request Headers:
POST /api2/updatePageTypeFieldValue HTTP/1.1
HOST: www.example.com
Content-Length: 361
Content-Type: application/x-www-form-urlencoded
Cookie: auth=DF31E377D7B7...B1507F110AEB

Request Data:
Unencoded Data:
json={
   "pageTypeId":"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e",
   "fieldId":"325770a4-5d4c-46eb-a7b1-3780efac8c78",
   "valueId":"f21c5aa0-f672-4379-8510-048157a7a19f",
   "listValue":"Here is an Example.",
   "listText":"Example"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json={ +++..." }&token=7AdbNHZQBtwc...TEK8UvSUQ=

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=6F643C55F09D...352547C5863; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

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

Input Object:
{
    pageTypeId:"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e",
    fieldId:"325770a4-5d4c-46eb-a7b1-3780efac8c78",
    valueId:"cf568c00-1722-483f-8179-3628283f4996",
    listValue:"Example",
    listText:"Here is an example."
}

Returned Data:
{}

Back to Page Types »