Skip to main content

GetClassType

Returns a type of the ApiCheckboxField class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiCheckboxField class.

Parameters

This method doesn't have any parameters.

Returns

"checkboxField"

Example

Check the class type returned by a checkbox field in a PDF document.

// How do I check what type a checkbox field object is in a PDF document?

// Retrieve and output the class type string for a checkbox field in a PDF document.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let checkboxField = Api.CreateCheckboxField([10, 10, 25, 25]);
page.AddObject(checkboxField);

console.log('Field type is: ' + checkboxField.GetClassType());