GetFormType

GetFormType() → { FormType }

Inherited From: ApiFormBase#GetFormType

Returns a type of the current form.

Parameters:

This method doesn't have any parameters.

Returns:

Type
FormType

Example

Copy code
builder.CreateFile("pdf");
var oDocument = Api.GetDocument();
var oDateForm = Api.CreateDateForm({"key": "Nowadays", "tip": "Enter current date", "required": true, "placeholder": "Date", "format": "mm.dd.yyyy", "lang": "en-US"});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oDateForm);
var sFormType = oDateForm.GetFormType();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Form type: " + sFormType);
oDocument.Push(oParagraph);
builder.SaveFile("pdf", "GetFormType.pdf");
builder.CloseFile();

Resulting document