# Deploying Forms with TX Text Control

> TX Text Control can be used to create sophisticated, smart forms to collect data from users in different ways. This article gives an overview of various ways to deploy forms using TX Text Control.

- **Author:** Bjoern Meyer
- **Published:** 2022-06-23
- **Modified:** 2026-07-17
- **Description:** TX Text Control can be used to create sophisticated, smart forms to collect data from users in different ways. This article gives an overview of various ways to deploy forms using TX Text Control.
- **5 min read** (817 words)
- **Tags:**
  - ASP.NET
  - Electronic Document
  - Forms
  - Windows Forms
  - WPF
- **Web URL:** https://www.textcontrol.com/blog/2022/06/23/deploying-forms-with-text-control/
- **LLMs URL:** https://www.textcontrol.com/blog/2022/06/23/deploying-forms-with-text-control/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2022/06/23/deploying-forms-with-text-control/llms-full.txt

---

TX Text Control offers a unique way to create documents with fillable form elements such as form text boxes, check box fields and drop-down elements. These forms can be created like mail merge templates and dynamically pre-completed with values form data sources.

### Creating Forms

Besides the option to create forms programmatically, form field elements can be added using the out-of-the-box, customizable ribbon UI.

> **Learn More**
> 
> Interactive forms in an Adobe PDF document can be used to gather information from end-users. This article shows how to create those forms using TX Text Control in .NET applications using C#.
> 
> [Creating Adobe PDF Forms in C# ](https://www.textcontrol.com/blog/2022/06/23/deploying-forms-with-text-control/llms-full.txt)

The following screenshot shows the ASP.NET version of TX Text Control and the opened *Form Field* ribbon tab to insert and edit form fields:

[![Creating form documents with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formfields.webp "Creating form documents with TX Text Control")](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formfields.webp)

Using conditional instructions, it is possible to add dependencies between fields based on logical operators. This allows to add a complete workflow to forms by adding dependencies between form fields. The following animated screenshot shows such a condition. If the user changes the selected product in the drop-down form field, the description and the unit price is changing:

![Creating documents with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formula.gif "Creating documents with TX Text Control")

> **Learn More**
> 
> Using conditional instructions, it is possible to add dependencies between fields based on logical operators. This allows to add a complete workflow to forms by adding dependencies between form fields. This article illustrates how to combine form fields with table cell formulas.
> 
> [Combining Form Fields and Formulas ](https://www.textcontrol.com/blog/2022/06/10/online-sample-combining-form-fields-and-formulas/llms-full.txt)

### Preparing the Document

The document editor cannot only be used to create those form documents, it can be used to deploy the form as well to collect the input data from users. For this purpose, the editor provides a special form filling mode that can be enabled.

To prepare a document for this mode, the document must be protected:

1. **Preparing the form**  
    After the form has been designed, form fields are added and conditional instructions are defined, change to the *Permissions* ribbon tab.
    
    In the *Restrict Editing* ribbon group, select *Fill in Form Fields* and *Read Only*.
    
    ![Creating form documents with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formfields2.webp "Creating form documents with TX Text Control")
2. **Encrypting the document**  
    Click on *Enforce Protection*, set a password in the following dialog and confirm with *OK*.
    
    ![Creating form documents with TX Text Control](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formfields3.webp "Creating form documents with TX Text Control")
3. **Saving the document**  
    In protected mode, save the document in the internal Text Control format:
    
    ```
    TXTextControl.saveDocument(TXTextControl.StreamType.InternalUnicodeFormat, 
    			   function(document) {
    	// send the document to your controller here
    	console.log(document.data);
    });
    ```

### Deploying using the Document Editor

In order to load this form into the document editor in read only mode, the editor must be initialized with the EditMode property set to *ReadOnly*.

```
@Html.TXTextControl().TextControl(settings => {
  settings.EditMode = EditMode.ReadOnly;
}).LoadText(Server.MapPath("~/App_Data/Documents/myform.tx"),
StreamType.InternalUnicodeFormat).Render()
```

To enable the form field validation and conditional instructions, the *setIsFormFieldValidationEnabled* property must be set to *true*:

```
TXTextControl.addEventListener("documentLoaded", function () {
    TXTextControl.setIsFormFieldValidationEnabled(true);
});
```

After this, the document is loaded as read only into the editor and users are only able to complete form fields. Programmatically, it is possible to save the document with the completed form fields or to extract filled form field data separately.

### Deploying using the Document Viewer

Another way to deploy the form is to use the lightweight document viewer that is compatible to the form fields created by the document editor (or MS Word) including conditional instructions.

When loading the document with form fields and conditional instructions into the document viewer, the form fields are enabled automatically:

![Forms in Document Viewer](https://s1-www.textcontrol.com/assets/dist/blog/2022/06/23/a/assets/formfields4.webp "Forms in Document Viewer")

In order to extract the form field values, the forms.getValues method can be utilized:

```
console.log(JSON.stringify(TXDocumentViewer.forms.getValues()));
```

```
[
  {
    "name":"vendor_name",
    "type":"text",
    "value":"Text Control, LLC"
  },
  {
    "name":"vendor_address",
    "type":"text",
    "value":"6926 Shannon Willow Rd, Suite 400"
  },
  {
    "name":"vendor_city",
    "type":"text",
    "value":"Charlotte"
  },
  {
    "name":"vendor_state",
    "type":"selection",
    "value":"North Carolina"
  },
  [...]
```

### Live Demos

All of these features can be tested live without downloading a trial version using the [Text Control Technical Demos](https://demos.textcontrol.com).

> **Live Demo**
> 
> Test the document viewer live in our online demos and learn how to export the completed form field values.
> 
> [Live Demo ](https://demos.textcontrol.com/demos/document-viewer/form-fields/export-values)

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Generating Interactive PDF Forms by Injecting JavaScript](https://www.textcontrol.com/blog/2022/03/31/generating-interactive-pdf-forms-by-injecting-javascript/llms.txt)
- [TX Text Control 34.0 SP5 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/09/14/tx-text-control-34-0-sp5-is-now-available/llms.txt)
- [TX Text Control 34.0 SP4 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/05/20/tx-text-control-34-0-sp4-is-now-available/llms.txt)
- [TXTextControl.Markdown.Core 34.1.0-beta: Work with Full Documents, Selection, and SubTextParts](https://www.textcontrol.com/blog/2026/04/14/txtextcontrol-markdown-core-34-1-0-beta-work-with-full-documents-selection-and-subtextparts/llms.txt)
- [TX Spell .NET 11.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/04/08/tx-spell-net-11-0-sp1-is-now-available/llms.txt)
- [TX Text Control 34.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/02/18/tx-text-control-34-0-sp2-is-now-available/llms.txt)
- [TX Text Control 34.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/12/03/tx-text-control-34-0-sp1-is-now-available/llms.txt)
- [Introducing TX Text Control 34.0: Your Next Leap in Document Processing](https://www.textcontrol.com/blog/2025/11/10/introducing-tx-text-control-34-0-your-next-leap-in-document-processing/llms.txt)
- [Sneak Peek: TX Text Control 34.0 Coming November 2025](https://www.textcontrol.com/blog/2025/10/02/sneak-peek-tx-text-control-34-0-coming-november-2025/llms.txt)
- [TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/08/14/tx-text-control-33-0-sp3-is-now-available/llms.txt)
- [TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/06/18/tx-text-control-33-0-sp2-is-now-available/llms.txt)
- [Document Lifecycle Optimization: Leveraging TX Text Control's Internal Format](https://www.textcontrol.com/blog/2025/05/16/document-lifecycle-optimization-leveraging-tx-text-controls-internal-format/llms.txt)
- [Expert Implementation Services for Legacy System Modernization](https://www.textcontrol.com/blog/2025/05/07/expert-implementation-services-for-legacy-system-modernization/llms.txt)
- [Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5](https://www.textcontrol.com/blog/2025/05/07/service-pack-releases-whats-new-in-tx-text-control-33-0-sp1-and-32-0-sp5/llms.txt)
- [Top 5 Real-World Applications for TX Text Control Document Processing Libraries](https://www.textcontrol.com/blog/2025/04/01/top-5-real-world-applications-for-tx-text-control-document-processing-libraries/llms.txt)
- [DWX Developer Week Moves to Mannheim - And Text Control Is on Board!](https://www.textcontrol.com/blog/2025/03/19/dwx-developer-week-moves-to-mannheim-and-tx-text-control-is-on-board/llms.txt)
- [The Wait is Over: TX Text Control for Linux is Officially Here](https://www.textcontrol.com/blog/2025/03/12/the-wait-is-over-tx-text-control-for-linux-is-officially-here/llms.txt)
- [Full .NET 9 Support in Text Control .NET Components for ASP.NET Core, Windows Forms, and WPF](https://www.textcontrol.com/blog/2024/11/11/full-net-9-support-in-text-control-net-components-for-asp-net-core-windows-forms-and-wpf/llms.txt)
- [Toggle Field Codes in TX Text Control](https://www.textcontrol.com/blog/2024/11/07/toggle-field-codes-in-tx-text-control/llms.txt)
- [TX Text Control 32.0 Service Pack 4 Released](https://www.textcontrol.com/blog/2024/09/02/tx-text-control-32-0-service-pack-4-released/llms.txt)
- [Service Pack 3: MailMerge Supports SVG Images](https://www.textcontrol.com/blog/2024/04/29/service-pack-3-mailmerge-supports-svg-images/llms.txt)
- [TX Text Control 32.0 Service Pack 3 Released](https://www.textcontrol.com/blog/2024/04/29/tx-text-control-32-0-service-pack-3-released/llms.txt)
- [Electronic Invoicing will Become Mandatory in Germany in 2025](https://www.textcontrol.com/blog/2024/04/10/electronic-invoicing-will-become-mandatory-in-germany-in-2025/llms.txt)
- [Inserting MergeBlocks with the DataSourceManager and Applying Table Styles in C#](https://www.textcontrol.com/blog/2024/04/09/inserting-mergeblocks-with-the-datasourcemanager-and-applying-table-styles-in-csharp/llms.txt)
- [The Power of SubTextParts: Typical Use Cases](https://www.textcontrol.com/blog/2024/02/09/the-power-of-subtextparts-typical-use-cases/llms.txt)
