Skip to main content

GetClassType

Returns a type of the ApiDateForm class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiDateForm class.

Parameters

This method doesn't have any parameters.

Returns

"dateForm"

Example

Find out the class type of a date form object.

// How can I get the class type of a date form?

// Get the class type of a date form and display it in the document.

let doc = Api.GetDocument();
let dateForm = Api.CreateDateForm({"key": "Nowadays", "tip": "Enter current date", "required": true, "placeholder": "Your date here", "format": "mm.dd.yyyy", "lang": "en-US"});
let paragraph = doc.GetElement(0);
paragraph.AddElement(dateForm);
let classType = dateForm.GetClassType();
paragraph = Api.CreateParagraph();
paragraph.AddText("Class type: " + classType);
doc.Push(paragraph);