# ConditionalInstruction Class

> 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. Objects of that class can be added to an instance of the ConditionalInstructionCollection class. The TextControl validates the conditions and executes resulting instructions in case the document switches into the form protection mode and in case the related form fields have been changed. In order to switch the document into the form protection mode, the TextControl.EditMode property must be set to EditMode.ReadAndSelect and the TextControl.DocumentPermissions.ReadOnly property must be set to true. To execute Conditional Instructions in this context, the TextControl.IsFormFieldValidationEnabled property value must to be set to true.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ConditionalInstruction Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/#members)

---

## In This Section

- [ConditionalInstruction.Conditions Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/conditions-property/llms.txt): Gets or sets an array of conditions, that represent the requirements that has to be fulfilled to execute the specified instructions. Each element of that array is linked by a logical connective connector with its previous element. Based on these relationships, in which the individual conditions relate to each other, it is evaluated whether the requirements to execute the instructions has been fulfilled.
- [ConditionalInstruction Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/constructor/llms.txt): Initializes a new instance of the ConditionalInstruction class.
- [ConditionalInstruction.Copy Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/copy-method/llms.txt): Returns a copy of this ConditionalInstruction object.
- [ConditionalInstruction.Instructions Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/instructions-property/llms.txt): Gets or sets an array of instructions that are executed when the specified conditions are fulfilled.
- [ConditionalInstruction.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/name-property/llms.txt): Gets or sets a name of the conditional instruction.

---

## Nearby

- **Previous:** [Condition.TextComparisonFlags Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/condition/textcomparisonflags-enumeration/llms.txt)
- **Next:** [ConditionalInstruction.Conditions Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstruction/conditions-property/llms.txt)
