com.aspose.words

Class TextFormFieldType

  • java.lang.Object
    • com.aspose.words.TextFormFieldType
public class TextFormFieldType 
extends java.lang.Object

Utility class containing constants. Specifies the type of a text form field.

Example:

Builds a sample form to fill.
DocumentBuilder builder = new DocumentBuilder();

// Insert a text form field for input a name.
builder.insertTextInput("", TextFormFieldType.REGULAR, "", "Enter your name here", 30);

// Insert two blank lines.
builder.writeln("");
builder.writeln("");

String[] items = new String[]{"-- Select your favorite footwear --", "Sneakers", "Oxfords", "Flip-flops", "Other", "I prefer to be barefoot"};

// Insert a combo box to select a footwear type.
builder.insertComboBox("", items, 0);

// Insert two blank lines.
builder.writeln("");
builder.writeln("");

builder.getDocument().save(getMyDir() + "\\Artifacts\\DocumentBuilder.CreateForm.doc");

Field Summary
static final intREGULAR = 0
The text form field can contain any text.
static final intNUMBER = 1
The text form field can contain only numbers.
static final intDATE = 2
The text form field can contain only a valid date value.
static final intCURRENT_DATE = 3
The text form field value is the current date when the field is updated.
static final intCURRENT_TIME = 4
The text form field value is the current time when the field is updated.
static final intCALCULATED = 5
The text form field value is calculated from the expression specified in the FormField.TextInputDefault property.
 

    • Field Detail

      • REGULAR = 0

        public static final int REGULAR
        The text form field can contain any text.
      • NUMBER = 1

        public static final int NUMBER
        The text form field can contain only numbers.
      • DATE = 2

        public static final int DATE
        The text form field can contain only a valid date value.
      • CURRENT_DATE = 3

        public static final int CURRENT_DATE
        The text form field value is the current date when the field is updated.
      • CURRENT_TIME = 4

        public static final int CURRENT_TIME
        The text form field value is the current time when the field is updated.
      • CALCULATED = 5

        public static final int CALCULATED
        The text form field value is calculated from the expression specified in the FormField.TextInputDefault property.