FormField

Overview

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

Represents a single form field.

This class provides 12 methods for working with FormField objects in .NET programs. Available methods include: Accept, Clone, GetAncestor, GetAncestorOf, GetText, NextPreOrder, NodeTypeToString, PreviousPreOrder, Remove, RemoveField, SetTextInputValue, ToString. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: CalculateOnExit, CheckBoxSize, Checked, CustomNodeId, Default, Document, and 30 more.

Properties

NameTypeAccessDescription
NodeTypeNodeTypeReadReturns FormField.
NamestringRead/WriteGets or sets the form field name.
TypeFieldTypeReadReturns the form field 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.
OwnStatusboolRead/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.
OwnHelpboolRead/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.
CalculateOnExitboolRead/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.
EnabledboolRead/WriteTrue if a form field is enabled.
TextInputFormatstringRead/WriteReturns or sets the text formatting for a text form field.
TextInputTypeTextFormFieldTypeRead/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.
CheckedboolRead/WriteGets or sets the checked status of the check box form field.
DefaultboolRead/WriteGets or sets the default value of the check box form field.
IsCheckBoxExactSizeboolRead/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.
ParentParagraphParagraphReadRetrieves the parent Paragraph of this node.
FontFontReadProvides access to the font formatting of this object.
IsInsertRevisionboolReadGets the is insert revision.
IsDeleteRevisionboolReadGets the is delete revision.
IsMoveFromRevisionboolReadGets the is move from revision.
IsMoveToRevisionboolReadGets the is move to revision.
IsFormatRevisionboolReadGets the is 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.
IsCompositeboolReadReturns 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)Accepts 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.
GetText()Gets the special character that this node represents.
Clone(isCloneChildren: bool)You should use the Clone(bool, INodeCloningListener) overload when the node cloning is a part of another (usually composite) node cloning process.
GetAncestor(ancestorType: Type)Gets the first ancestor of the specified object type.
GetAncestorOf()Provides access to the items of a dropdown form field.
Remove()Removes itself from the parent.
NextPreOrder(rootNode: Node)Gets next node according to the pre-order tree traversal algorithm.
PreviousPreOrder(rootNode: Node)Gets the previous node according to the pre-order tree traversal algorithm.
ToString(saveFormat: SaveFormat)Exports the content of the node into a string in the specified format.
NodeTypeToString(nodeType: NodeType)A utility method that converts a node type enum value into a user friendly string.

See Also