TextFormField Object
Description
The TextFormField object represents a text input field on a form. It can be initially empty and it can have a horizontal extension, when it is empty.
Syntax
TextFormFieldExamples
The following example demonstrates TextFormField in a practical document-editing workflow. The TextFormField object represents a text input field on a form. It can be initially empty and it can have a horizontal extension, when it is empty.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectTextFormField(textFormField) {
textFormField.getEmptyWidth(
function(result) {
console.log("get empty width result:", result);
},
onTxError
);
}Members
Methods
| Method | Description |
|---|---|
| getDescriptiveText | Gets the form field's descriptive text. An empty string indicates that the link has no such text. (Inherited from FormField.) |
| getEmptyWidth | Gets the horizontal extension, in twips, of the text formfield, when it is empty. |
| getEnabled | Gets a value indicating whether the form field is enabled. (Inherited from FormField.) |
| setDescriptiveText | Sets the form field's descriptive text. An empty string or null can be used to delete a previously set text. (Inherited from FormField.) |
| setEmptyWidth | Sets the horizontal extension, in twips, of the text formfield, when it is empty. |
| setEnabled | Sets a value indicating whether the form field is enabled. This property has only an effect, when the when the edit mode is set to TXTextControl.EditMode.ReadAndSelect and the allowEditingFormFields property of the document permissions has been set to true. In this case a Formfield can only be edited, when its Enabled property is true. When a FormField is disabled, the TextFieldClicked and TextFieldDoubleClicked of the Formfield are suppressed. The default value of this property is true. (Inherited from FormField.) |