Skip to main content

SetSpecialFormat

Sets special format for field.

Syntax

expression.SetSpecialFormat(sFormat);

expression - A variable that represents a ApiComboboxField class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sFormatRequiredPsfFormatthe formatting style to apply to the value

Returns

boolean

Example

Get text field and set special format for it.

// How to set special format for a combobox field?

// Set special format and display the result in a PDF document.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let comboboxField = Api.CreateComboboxField([10, 10, 160, 30]);
page.AddObject(comboboxField);

comboboxField.SetSpecialFormat("phone");
comboboxField.SetValue("1234567890");