checkValidNewPageTypeField()

Pixelsilk API function to verify that a field name does not conflict with another field or control--requires the advanced-admin-access permission
Parameters:
pageTypeId: the unique identifier of the page type
fieldName: the name of the field

Output:
The function checkValidNewPageTypeField returns a string containing a message about the name if not valid and an empty string if valid

C# Example:
Guid pageTypeId = <page type's id>;
string fieldName = "newField";
string validity = CheckValidNewPageTypeField(pageTypeId, fieldName);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/checkValidNewPageTypeField HTTP/1.1
HOST: www.example.com
Content-Length: 167
Content-Type: application/x-www-form-urlencoded
Cookie: auth=D3C6BC1B5633...02DAE8FD4161

Request Data:
Unencoded Data:
json={
   "pageTypeId":"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462",
   "fieldName":"Example"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=242179E36876...ABB1CAAF45B; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
""

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

Input Object:
{
    pageTypeId:"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462",
    fieldName:"Example"
}

Returned Data:
""

Back to Page Types »