Designing and Filling Forms

Special types of text fields have been implemented to support designing and filling forms. They can be managed with the FormFieldCollection available through the TextControl.FormFields, the WPF.TextControl.FormFields or the ServerTextControl.FormFields property. An object of the CheckFormField class represents a checkbox and can be checked or unchecked through the end-user. The field itself cannot be edited, the field's text is set either to the Unicode character for the checked state or to the character for the unchecked state. An object of the TextFormField class is a text input field for a form. When it is empty it can be set to a specified width. An object of the SelectionFormField class can either be used to offer the end-user a combobox or a drop-down list, depending on whether the field's text is changeable or not. An object of the DateFormField class can be used to manage and format a date. The user can select the date via a date control or through entering text. Corresponding events indicate that a form field's contents have been changed. The FormFieldCheckChanged and FormFieldDateChanged events inform about a changed check state or date, the FormFieldSelectionChanged event about a new selected item and the FormFieldTextChanged event occurs when the text of a TextFormField was altered. The DocumentPermissions class offers the DocumentPermissions.AllowEditingformFields property so that form fields can still be edited, if the EditMode property has been changed from Edit to ReadAndSelect. Form fields can be saved and loaded with Textcontrol's text format (.TX) and with the .DOC, .DOCX and .RTF formats. When saving a document as .pdf, form fields are converted to PDF formfields. A Microsoft Word form field is converted either to a TextControl FormField or to an ApplicationField depending on the LoadSettings.ApplicationFieldFormat property. The keyboard and mouse assignment is listed in Mouse and Keyboard Assignment for Form Fields. More information about formfields can be found in Creating Forms. Furthermore, a complete rule engine is available to enable workflows and logic within forms. By using the built-in ManageConditionalInstructionsDialog dialog or Conditional Instructions sidebar, the ConditionalInstructionDialog dialog is provided to define objects of type ConditionalInstruction. An instance of that class represents a list of form field related Instruction elements that are executed when specific requirements, represented by an array of Condition objects, are fulfilled. It is added to an instance of the ConditionalInstructionCollection class, that can be obtained with the FormFieldCollection.ConditionalInstructions property. A condition of a ConditionalInstruction is met, when the comparison between the value of the related FormField and the required comparison value succeeded. An object of type Instruction represents one of up to four types of actions that can be executed to the related form field: Changing the FormField.Enabled property, marking the form field value as valid or invalid, setting a new value and replacing the SelectionFormField.Items array with another string array. Furthermore, an else instruction value can be defined to that instruction, which is applied when the corresponding conditions are not fulfilled. More information about conditional instructions can be found in Creating Conditional Instructions for Form Fields.

Classes

Class Description
TXTextControl.CheckFormField The CheckFormField class represents a checkbox in a document.
TXTextControl.CheckFormFieldEventArgs The CheckFormFieldEventArgs class provides data for the TextControl.FormFieldCheckChanged event.
TXTextControl.Condition An object of the Condition class is an element of the ConditionalInstruction class and represents the state of a FormField that has to be fulfilled to execute the instructions of the related ConditionalInstruction object.
TXTextControl.ConditionalInstruction An object of the ConditionalInstruction class represents a list of form field related instructions that are executed when specific requirements, represented by an array of conditions, are fulfilled.
TXTextControl.ConditionalInstructionCollection An instance of the ConditionalInstructionCollection class contains all conditional instructions in a Text Control document or part of the document represented through objects of type ConditionalInstruction.
TXTextControl.DateFormField An object of the DateFormField class represents a date field on a form.
TXTextControl.DateFormFieldEventArgs The DateFormFieldEventArgs class provides data for the TextControl.FormFieldDateChanged event.
TXTextControl.FormField The FormField class is the base class of all form fields.
TXTextControl.FormFieldCollection An instance of the FormFieldCollection class contains all form fields in a Text Control document represented through objects of the types TextFormField, CheckFormField and SelectionFormField.
TXTextControl.FormFieldEventArgs The FormFieldEventArgs class provides data for the TextControl.FormFieldSettingsChanged event, which occurs, when the name, the id and/or formatting attributes of a form field have been changed.
TXTextControl.Instruction An object of the Instruction class is an element of the ConditionalInstruction class and represents actions that are execute´d when the corresponding conditions are fulfilled.
TXTextControl.SelectionFormField An object of the SelectionFormField class represents a combobox or a drop-down list on a form.
TXTextControl.SelectionFormFieldEventArgs The SelectionFormFieldEventArgs class provides data for the TextControl.FormFieldSelectionChanged event.
TXTextControl.TextFormField An object of the TextFormField class represents a text input field on a form.
TXTextControl.TextFormFieldEventArgs The TextFormFieldEventArgs class provides data for the TextControl.FormFieldTextChanged event.

Constructors

Constructor Description
TXTextControl.CheckFormField Initializes a new instance of the CheckFormField class.
TXTextControl.Condition Initializes a new instance of the Condition class.
TXTextControl.ConditionalInstruction Initializes a new instance of the ConditionalInstruction class.
TXTextControl.DateFormField Initializes a new instance of the DateFormField class.
TXTextControl.Instruction Initializes a new instance of the Instruction class to determine an action that is executed when the defined requirements of the ConditionalInstruction.Conditions array are fulfilled or not fulfilled.
TXTextControl.SelectionFormField Initializes a new instance of the SelectionFormField class.
TXTextControl.TextFormField Initializes a new instance of the TextFormField class.

Enumerations

Enumeration Description
TXTextControl.Condition.ComparisonOperators Determines the comparison operator that is used to compare the condition's form field value with the specified comparison value or the interpretation of that value.
TXTextControl.Condition.ComparisonValueTypes Determines how the condition's comparison value is interpreted by the condition.
TXTextControl.Condition.ItemComparisonFlags Determines how the specified comparison value has to be interpreted when comparing it with the SelectionFormField's Text property.
TXTextControl.Condition.LogicalConnectives Determines how the condition is related to the previous condition inside the corresponding ConditionalInstruction.Conditions array.
TXTextControl.Condition.Month Determines the month that is compared with the condition's form field value.
TXTextControl.Condition.TextComparisonFlags Determines how the specified comparison value has to be interpreted when comparing it with the TextFormField's or SelectionFormField's Text property.
TXTextControl.Instruction.InstructionTypes Determines the type of action to execute.

Events

Event Description
TXTextControl.WPF.TextControl.FormFieldCheckChanged Occurs when the checkmark of a CheckFormField has been changed from checked to unchecked or vice versa.
TXTextControl.WPF.TextControl.FormFieldDateChanged Occurs when the date of a DateFormField has been changed.
TXTextControl.WPF.TextControl.FormFieldSelectionChanged Occurs when the selected item of a SelectionFormField has been changed.
TXTextControl.WPF.TextControl.FormFieldSettingsChanged Occurs when the name, the id and/or formatting attributes of a CheckFormField, TextFormField, SelectionFormField or DateFormField have been changed.
TXTextControl.WPF.TextControl.FormFieldTextChanged Occurs when the text of a TextFormField has been changed.

Fields

Field Description
TXTextControl.CheckFormField.DefaultCheckedCharacter Represents the default character which is used to display the checkbox in the checked state.
TXTextControl.CheckFormField.DefaultUncheckedCharacter Represents the default character which is used to display the checkbox in the unchecked state.

Methods

Method Description
TXTextControl.ConditionalInstruction.Copy Returns a copy of this ConditionalInstruction object.
TXTextControl.ConditionalInstructionCollection.Add Inserts an instance of the class ConditionalInstruction to the collection and the document.
TXTextControl.ConditionalInstructionCollection.Clear Removes all conditional instructions from the collection and the document.
TXTextControl.ConditionalInstructionCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.ConditionalInstructionCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.ConditionalInstructionCollection.GetItem Gets that ConditionalInstruction element from the collection, where the Name property value equals the specified name.
TXTextControl.ConditionalInstructionCollection.GetItems Gets those ConditionalInstruction elements from the collection, where at least one Condition or Instruction element references the specified FormField.
TXTextControl.ConditionalInstructionCollection.IsValueValid Returns a value indicating whether the value of a specific form field is marked as valid.
TXTextControl.ConditionalInstructionCollection.Remove Removes that ConditionalInstruction element from the collection and the document, where the Name property value equals the specified name.
TXTextControl.FormField.FormFieldDialog Opens a dialog box to alter the formatting attributes of the form field.
TXTextControl.FormFieldCollection.Add Inserts the specified form field at the current input position.
TXTextControl.FormFieldCollection.Clear Removes all form fields from a Text Control document.
TXTextControl.FormFieldCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.FormFieldCollection.GetItem Gets a particular form field from the collection.
TXTextControl.FormFieldCollection.Remove Removes the specified form field from a Text Control document.
TXTextControl.WPF.TextControl.ConditionalInstructionDialog Opens a dialog box to create or edit a Conditional Instruction.
TXTextControl.WPF.TextControl.ManageConditionalInstructionsDialog Opens a dialog box to add, edit or delete Conditional Instructions inside the document.
TXTextControl.WPF.TextControl.OnFormFieldCheckChanged Raises the FormFieldCheckChanged event.
TXTextControl.WPF.TextControl.OnFormFieldDateChanged Raises the FormFieldDateChanged event.
TXTextControl.WPF.TextControl.OnFormFieldSelectionChanged Raises the FormFieldSelectionChanged event.
TXTextControl.WPF.TextControl.OnFormFieldSettingsChanged Raises the FormFieldSettingsChanged event.
TXTextControl.WPF.TextControl.OnFormFieldTextChanged Raises the FormFieldTextChanged event.

Properties

Property Description
TXTextControl.CheckFormField.CheckedCharacter Gets or sets the character which is used to display the checkbox in the checked state.
TXTextControl.CheckFormField.Checked Gets or set a value indicating whether the checkbox is in the checked state.
TXTextControl.CheckFormField.SupportedCheckedCharacters Gets possible characters which can be used to display the checkbox in the checked state.
TXTextControl.CheckFormField.SupportedUncheckedCharacters Gets possible characters which can be used to display the checkbox in the unchecked state.
TXTextControl.CheckFormField.UncheckedCharacter Gets or sets the character which is used to display the checkbox in the unchecked state.
TXTextControl.CheckFormFieldEventArgs.CheckFormField Gets an object representing the CheckFormField that causes the event.
TXTextControl.Condition.ComparisonOperator Gets the operator that is used to compare the condition's form field value with the specified comparison value.
TXTextControl.Condition.ComparisonValue Gets the value that is compared with the condition's form field value.
TXTextControl.Condition.ComparisonValueType Gets a value of type ComparisonValueTypes that determines how the condition's comparison value is interpreted.
TXTextControl.Condition.FormField Gets the FormField whose property value is to be compared with the condition's comparison value.
TXTextControl.Condition.LogicalConnective Gets or sets a value of type Condition.LogicalConnectives that describes how the condition is related to the previous condition inside the corresponding ConditionalInstruction.Conditions array.
TXTextControl.ConditionalInstruction.Conditions Gets or sets an array of conditions, that represent the requirements that has to be fulfilled to execute the specified instructions.
TXTextControl.ConditionalInstruction.Instructions Gets or sets an array of instructions that are executed when the specified conditions are fulfilled.
TXTextControl.ConditionalInstruction.Name Gets or sets a name of the conditional instruction.
TXTextControl.ConditionalInstructionCollection.ConditionalInstructionNames Gets the names of all ConditionalInstruction elements that are listed inside the collection.
TXTextControl.ConditionalInstructionCollection.Count Gets the number of elements contained in the collection.
TXTextControl.DateFormField.Date Gets or sets the DateFormField's date.
TXTextControl.DateFormField.DateFormat Gets or sets the date's format.
TXTextControl.DateFormField.EmptyWidth Gets or sets the horizontal extension, in twips, of the DateFormField, when a date is not set.
TXTextControl.DateFormField.IsDateControlVisible Gets or sets a value indicating wheather a date control is shown below the DateFormField so that the user can select a date.
TXTextControl.DateFormField.SupportedDateFormats Gets an array of format picture strings which can be used to format the date.
TXTextControl.DateFormFieldEventArgs.DateFormField Gets an object representing the DateFormField that causes the event.
TXTextControl.FormField.Enabled Gets or set a value indicating whether the form field is enabled.
TXTextControl.FormFieldCollection.ConditionalInstructions Gets a collection of all conditional instructions that references to the form fields of the collection.
TXTextControl.FormFieldCollection.Item Gets the form field with the specified number from the collection.
TXTextControl.FormFieldEventArgs.FormField Gets an object that represents the form field which causes the event.
TXTextControl.Instruction.ElseInstructionValue Gets the value that is set by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are not fulfilled and the Instruction.IsElseInstructionEnabled property is set to true.
TXTextControl.Instruction.FormField Gets the FormField to which the specified action is executed.
TXTextControl.Instruction.InstructionType Gets the type of action to execute.
TXTextControl.Instruction.InstructionValue Gets the value that is set by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are fulfilled.
TXTextControl.Instruction.IsElseInstructionEnabled Gets or sets a value indicating whether this Instruction allows to execute else instructions.
TXTextControl.Instruction.IsFormFieldChangeInstruction Gets or sets a value indicating whether this Instruction listens to value changes of the related conditions' form fields.
TXTextControl.Instruction.IsInitialInstruction Gets or sets a value indicating whether this Instruction is handled when the document is initialized as a form.
TXTextControl.SelectionFormField.EmptyWidth Gets or sets the horizontal extension, in twips, of the SelectionFormField, when there is no selected item.
TXTextControl.SelectionFormField.IsDropDownArrowVisible Gets or sets a value indicating wheather a dropdown arrow is shown so that the user can select an item.
TXTextControl.SelectionFormField.Items Gets or sets a list of items for the SelectionFormField.
TXTextControl.SelectionFormField.SelectedIndex Gets or sets the index of the selected item of the SelectionFormField.
TXTextControl.SelectionFormFieldEventArgs.SelectionFormField Gets an object representing the SelectionFormField that causes the event.
TXTextControl.ServerTextControl.FormFields Gets a collection of all form fields contained in the document.
TXTextControl.TextFormField.EmptyWidth Gets or sets the horizontal extension, in twips, of the form field, when it is empty.
TXTextControl.TextFormFieldEventArgs.TextFormField Gets an object representing the TextFormField that causes the event.
TXTextControl.WPF.TextControl.FormFields Gets a collection of all form fields contained in the document.
TXTextControl.WPF.TextControl.IsFormFieldValidationEnabled Gets or sets a value indicating whether Conditional Instructions are applied to form fields when the EditMode property is set to EditMode.ReadAndSelect and TextControl.DocumentPermissions.ReadOnly to true.