FormField

Overview

FormField is a class in Aspose.Words FOSS for Java. Inherits from: SpecialChar, IRunAttrSource.

Represents a single form field.

Edition status of its 103 listed members (a property and its accessor methods are listed separately, overloads once): 103 not yet exercised by a verified example.

This class declares 70 methods for FormField objects in Java programs. Available methods include: accept, deepClone, getAncestor, getCalculateOnExit, getCheckBoxSize, getChecked, getCustomNodeId, getDefault, getDocument, getDropDownItems, getDropDownSelectedIndex, getEnabled, and 54 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: calculateOnExit, checkBoxExactSize, checkBoxSize, checked, composite, customNodeId, and 31 more.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns FormField.
nameStringRead/WriteGets or sets the form field name.
typeintReadGets the type.
resultStringRead/WriteGets or sets a string that represents the result of this form field.
statusTextStringRead/WriteReturns or sets the text that’s displayed in the status bar when a form field has the focus.
ownStatusbooleanRead/WriteSpecifies the source of the text that’s displayed in the status bar when a form field has the focus.
helpTextStringRead/WriteReturns or sets the text that’s displayed in a message box when the form field has the focus and the user presses F1.
ownHelpbooleanRead/WriteSpecifies the source of the text that’s displayed in a message box when a form field has the focus and the user presses F1.
calculateOnExitbooleanRead/WriteTrue if references to the specified form field are automatically updated whenever the field is exited.
entryMacroStringRead/WriteReturns or sets an entry macro name for the form field.
exitMacroStringRead/WriteReturns or sets an exit macro name for the form field.
enabledbooleanRead/WriteTrue if a form field is enabled.
textInputFormatStringRead/WriteReturns or sets the text formatting for a text form field.
textInputTypeintRead/WriteGets or sets the type of a text form field.
textInputDefaultStringRead/WriteGets or sets the default string or a calculation expression of a text form field.
maxLengthintRead/WriteMaximum length for the text field.
dropDownItemsDropDownItemCollectionReadProvides access to the items of a dropdown form field.
dropDownSelectedIndexintRead/WriteGets or sets the index specifying the currently selected item in a dropdown form field.
checkedbooleanRead/WriteGets or sets the checked status of the check box form field.
defaultbooleanRead/WriteGets or sets the default value of the check box form field.
checkBoxExactSizebooleanRead/WriteGets or sets the boolean value that indicates whether the size of the textbox is automatic or specified explicitly.
checkBoxSizedoubleRead/WriteGets or sets the size of the checkbox in points.
textStringReadGets the special character that this node represents.
parentParagraphParagraphReadRetrieves the parent Paragraph of this node.
fontFontReadProvides access to the font formatting of this object.
insertRevisionbooleanReadGets the insert revision.
deleteRevisionbooleanReadGets the delete revision.
moveFromRevisionbooleanReadGets the move from revision.
moveToRevisionbooleanReadGets the move to revision.
formatRevisionbooleanReadGets the format revision.
parentNodeCompositeNodeReadGets the immediate parent of this node.
documentDocumentBaseReadGets the document to which this node belongs.
previousSiblingNodeReadGets the node immediately preceding this node.
nextSiblingNodeReadGets the node immediately following this node.
compositebooleanReadReturns true if this node can contain other nodes.
rangeRangeReadReturns a Range object that represents the portion of a document that is contained in this node.
customNodeIdintRead/WriteSpecifies custom node identifier.

Methods

SignatureDescription
accept(visitor: DocumentVisitor) → booleanAccepts a visitor.
removeField()Removes the complete form field, not just the form field special character.
setTextInputValue(newValue: Object)Applies the text format specified in TextInputFormat and stores the value in Result.
getNodeType() → intReturns FormField.
getName() → StringGets or sets the form field name.
setName(value: String)Sets the name value.
getType() → intReturns the type.
getResult() → StringGets or sets a string that represents the result of this form field.
setResult(value: String)Sets the result value.
getStatusText() → StringReturns or sets the text that’s displayed in the status bar when a form field has the focus.
setStatusText(value: String)Sets the status text value.
getOwnStatus() → booleanSpecifies the source of the text that’s displayed in the status bar when a form field has the focus.
setOwnStatus(value: boolean)Sets the own status value.
getHelpText() → StringReturns or sets the text that’s displayed in a message box when the form field has the focus and the user presses F1.
setHelpText(value: String)Sets the help text value.
getOwnHelp() → booleanSpecifies the source of the text that’s displayed in a message box when a form field has the focus and the user presses F1.
setOwnHelp(value: boolean)Sets the own help value.
getCalculateOnExit() → booleanTrue if references to the specified form field are automatically updated whenever the field is exited.
setCalculateOnExit(value: boolean)Sets the calculate on exit value.
getEntryMacro() → StringReturns or sets an entry macro name for the form field.
setEntryMacro(value: String)Sets the entry macro value.
getExitMacro() → StringReturns or sets an exit macro name for the form field.
setExitMacro(value: String)Sets the exit macro value.
getEnabled() → booleanTrue if a form field is enabled.
setEnabled(value: boolean)Sets the enabled value.
getTextInputFormat() → StringReturns or sets the text formatting for a text form field.
setTextInputFormat(value: String)Sets the text input format value.
getTextInputType() → intGets or sets the type of a text form field.
setTextInputType(value: int)Sets the text input type value.
getTextInputDefault() → StringGets or sets the default string or a calculation expression of a text form field.
setTextInputDefault(value: String)Sets the text input default value.
getMaxLength() → intMaximum length for the text field.
setMaxLength(value: int)Sets the max length value.
getDropDownItems() → DropDownItemCollectionProvides access to the items of a dropdown form field.
getDropDownSelectedIndex() → intGets or sets the index specifying the currently selected item in a dropdown form field.
setDropDownSelectedIndex(value: int)Sets the drop down selected index value.
getChecked() → booleanGets or sets the checked status of the check box form field.
setChecked(value: boolean)Sets the checked value.
getDefault() → booleanGets or sets the default value of the check box form field.
setDefault(value: boolean)Sets the default value.
isCheckBoxExactSize() → booleanGets or sets the boolean value that indicates whether the size of the textbox is automatic or specified explicitly.
isCheckBoxExactSize(value: boolean)Calls isCheckBoxExactSize(value) on this FormField instance.
getCheckBoxSize() → doubleGets or sets the size of the checkbox in points.
setCheckBoxSize(value: double)Sets the check box size value.
getText() → StringGets the special character that this node represents.
getParentParagraph() → ParagraphRetrieves the parent Paragraph of this node.
getFont() → FontProvides access to the font formatting of this object.
isInsertRevision() → booleanReturns true if insert revision is set.
isDeleteRevision() → booleanReturns true if delete revision is set.
isMoveFromRevision() → booleanReturns true if move from revision is set.
isMoveToRevision() → booleanReturns true if move to revision is set.
isFormatRevision() → booleanReturns true if format revision is set.
getParentNode() → CompositeNodeGets the immediate parent of this node.
getDocument() → DocumentBaseGets the document to which this node belongs.
getPreviousSibling() → NodeGets the node immediately preceding this node.
getNextSibling() → NodeGets the node immediately following this node.
isComposite() → booleanReturns true if this node can contain other nodes.
getRange() → RangeReturns a Range object that represents the portion of a document that is contained in this node.
deepClone(isCloneChildren: boolean) → NodeCalls deepClone(isCloneChildren) on this FormField instance.
getAncestor(ancestorType: Class) → CompositeNodeGets the first ancestor of the specified object type.
getAncestor(ancestorType: int) → CompositeNodeGets the first ancestor of the specified NodeType.
remove()Removes itself from the parent.
nextPreOrder(rootNode: Node) → NodeGets next node according to the pre-order tree traversal algorithm.
previousPreOrder(rootNode: Node) → NodeGets the previous node according to the pre-order tree traversal algorithm.
toString(saveFormat: int) → StringExports the content of the node into a string in the specified format.
toString(saveOptions: SaveOptions) → StringExports the content of the node into a string using the specified save options.
nodeTypeToString(nodeType: int) → StringA utility method that converts a node type enum value into a user friendly string.
getCustomNodeId() → intSpecifies custom node identifier.
setCustomNodeId(value: int)Sets the custom node id value.
toString() → StringCalls toString on this FormField instance.

See Also