Specifies Microsoft Word field types.
            
Namespace: SautinSoft.DocumentAssembly: SautinSoft.Document (in SautinSoft.Document.dll) Version: 2025.10.22
SyntaxPublic Enumeration FieldType
Members| Member name | Value | Description | 
|---|
| Unknown | 0 |   | 
| Complex | 1 |   | 
| CreateDate | 2 |   | 
| Date | 3 |   | 
| EditTime | 4 |   | 
| PrintDate | 5 |   | 
| SaveDate | 6 |   | 
| Time | 7 |   | 
| Compare | 8 |   | 
| DocVariable | 9 |   | 
| GoToButton | 10 |   | 
| If | 11 |   | 
| MacroButton | 12 |   | 
| Print | 13 |   | 
| Author | 14 |   | 
| Comments | 15 |   | 
| DocProperty | 16 |   | 
| FileName | 17 |   | 
| FileSize | 18 |   | 
| Info | 19 |   | 
| Keywords | 20 |   | 
| LastSavedBy | 21 |   | 
| NumChars | 22 |   | 
| NumPages | 23 |   | 
| NumWords | 24 |   | 
| Subject | 25 |   | 
| Template | 26 |   | 
| Title | 27 |   | 
| Formula | 28 |   | 
| Advance | 29 |   | 
| Eq | 30 |   | 
| Symbol | 31 |   | 
| Index | 32 |   | 
| RD | 33 |   | 
| TA | 34 |   | 
| TC | 35 |   | 
| TOA | 36 |   | 
| TOC | 37 |   | 
| XE | 38 |   | 
| AutoText | 39 |   | 
| AutoTextList | 40 |   | 
| Bibliography | 41 |   | 
| Citation | 42 |   | 
| Hyperlink | 43 |   | 
| IncludePicture | 44 |   | 
| IncludeText | 45 |   | 
| Link | 46 |   | 
| NoteRef | 47 |   | 
| PageRef | 48 |   | 
| Quote | 49 |   | 
| Ref | 50 |   | 
| StyleRef | 51 |   | 
| AddressBlock | 52 |   | 
| Ask | 53 |   | 
| Database | 54 |   | 
| FillIn | 55 |   | 
| GreetingLine | 56 |   | 
| MergeField | 57 |   | 
| MergeRec | 58 |   | 
| MergeSeq | 59 |   | 
| Next | 60 |   | 
| NextIf | 61 |   | 
| Set | 62 |   | 
| SkipIf | 63 |   | 
| AutoNum | 64 |   | 
| AutoNumLgl | 65 |   | 
| AutoNumOut | 66 |   | 
| BarCode | 67 |   | 
| ListNum | 68 |   | 
| Page | 69 |   | 
| RevNum | 70 |   | 
| Section | 71 |   | 
| SectionPages | 72 |   | 
| Seq | 73 |   | 
| Shape | 74 |   | 
| UserAddress | 75 |   | 
| UserInitials | 76 |   | 
| UserName | 77 |   | 
| FormCheckBox | 78 |   | 
| FormDropDown | 79 |   | 
| FormText | 80 |   | 
| DisplayBarcode | 81 |   | 
ExampleSee Developer Guide: Generate document (PDF) with forms and fields
Generate document (PDF) with forms and fields using C#
using System;
using System.Globalization;
using System.Text;
using SautinSoft.Document;
using SautinSoft.Document.MailMerging;
using SautinSoft.Document.Tables;
class Sample
{
    static void Main(string[] args)
    {
            
            
        FormsAndFields();
    }
    
    
    
    
    
    
    public static void FormsAndFields()
    {
        DocumentCore dc = new DocumentCore();
        string placeHolder = new string('\x2002', 50);
        
        Field fFullName = new Field(dc, FieldType.FormText, null, placeHolder);
        fFullName.FormData.Name = "FullName";
        fFullName.FormData.Enabled = true;
        Field fBirthData = new Field(dc, FieldType.FormText, null, placeHolder);
        fBirthData.FormData.Name = "BirthDate";
        Field fGender = new Field(dc, FieldType.FormDropDown);
        fGender.FormData.Name = "Gender";
        Field fMarried = new Field(dc, FieldType.FormCheckBox);
        fMarried.FormData.Name = "Married";
        fMarried.FormData.Enabled = true;
        Field fPhone = new Field(dc, FieldType.FormText, null, placeHolder);
        fPhone.FormData.Name = "Phone";
        dc.Sections.Add(new Section(dc,
            new Paragraph(dc,
            new Run(dc, "Full name: "),
            fFullName),
            new Paragraph(dc,
            new Run(dc, "Birth date: "),
            fBirthData),
            new Paragraph(dc,
            new Run(dc, "Gender: "),
            fGender),
            new Paragraph(dc,
            new Run(dc, "Married: "),
            fMarried),
            new Paragraph(dc,
            new Run(dc, "Phone: "),
            fPhone)));
        
        var formFieldsData = dc.Content.FormFieldsData;
        var fullNameFieldData = (FormTextData)formFieldsData["FullName"];
        fullNameFieldData.MaximumLength = 50;
        fullNameFieldData.StatusText = fullNameFieldData.HelpText = "Enter your name and surname (trimmed to 50 characters).";
        fullNameFieldData.Field.ResultInlines.Content.Replace("Mister Bean");
        var birthdateFieldData = (FormTextData)formFieldsData["BirthDate"];
        birthdateFieldData.TextType = FormTextType.Date;
        birthdateFieldData.DefaultValue = "1990-01-01";
        birthdateFieldData.ValueFormat = "yyyy-MM-dd";
        birthdateFieldData.StatusText = birthdateFieldData.HelpText =
            "Enter your date of birth.";
        birthdateFieldData.Field.ResultInlines.Content.Replace("1990-01-01");
        var genderFieldData = (FormDropDownData)formFieldsData["Gender"];
        genderFieldData.Items.Add("Select sex");
        genderFieldData.Items.Add("Male");
        genderFieldData.Items.Add("Female");
        genderFieldData.Items.Add("I don't know");
        genderFieldData.StatusText = genderFieldData.HelpText =
            "Select your gender.";
        genderFieldData.SelectedItemIndex = 0;
        var marriedFieldData = (FormCheckBoxData)formFieldsData["Married"];
        marriedFieldData.StatusText = marriedFieldData.HelpText =
                    "Mark as checked if you are married.";
        marriedFieldData.DefaultValue = true;
        marriedFieldData.Value = true;
        var salaryFieldData = (FormTextData)formFieldsData["Phone"];
        salaryFieldData.TextType = FormTextType.Number;
        salaryFieldData.DefaultValue = "555 13-12";
        salaryFieldData.ValueFormat = "(###) ###-####";
        salaryFieldData.StatusText = salaryFieldData.HelpText =
            "Enter your phone number.";
        salaryFieldData.Field.ResultInlines.Content.Replace("+1 (800) 111 2233");
        dc.Save(@"fields-template.pdf", new PdfSaveOptions() {PreserveFormFields=true });
        
        System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(@"fields-template.pdf") { UseShellExecute = true });
    }
}Generate document (PDF) with forms and fields using VB.Net
Option Infer On
Imports System
Imports System.Globalization
Imports System.Text
Imports SautinSoft.Document
Imports SautinSoft.Document.MailMerging
Imports SautinSoft.Document.Tables
Module Sample
    Sub Main()
        FormsAndFields()
    End Sub
    
    
    
    
    
    
    
    
    Sub FormsAndFields()
        Dim dc As New DocumentCore()
        Dim placeHolder As New String(ChrW(&H2002), 50)
        
        Dim fFullName As New Field(dc, FieldType.FormText, Nothing, placeHolder)
        fFullName.FormData.Name = "FullName"
        fFullName.FormData.Enabled = True
        Dim fBirthData As New Field(dc, FieldType.FormText, Nothing, placeHolder)
        fBirthData.FormData.Name = "BirthDate"
        Dim fGender As New Field(dc, FieldType.FormDropDown)
        fGender.FormData.Name = "Gender"
        Dim fMarried As New Field(dc, FieldType.FormCheckBox)
        fMarried.FormData.Name = "Married"
        fMarried.FormData.Enabled = True
        Dim fPhone As New Field(dc, FieldType.FormText, Nothing, placeHolder)
        fPhone.FormData.Name = "Phone"
        dc.Sections.Add(New Section(dc, New Paragraph(dc, New Run(dc, "Full name: "), fFullName), New Paragraph(dc, New Run(dc, "Birth date: "), fBirthData), New Paragraph(dc, New Run(dc, "Gender: "), fGender), New Paragraph(dc, New Run(dc, "Married: "), fMarried), New Paragraph(dc, New Run(dc, "Phone: "), fPhone)))
        
        Dim formFieldsData = dc.Content.FormFieldsData
        Dim fullNameFieldData = CType(formFieldsData("FullName"), FormTextData)
        fullNameFieldData.MaximumLength = 50
        fullNameFieldData.HelpText = "Enter your name and surname (trimmed to 50 characters)."
        fullNameFieldData.StatusText = fullNameFieldData.HelpText
        fullNameFieldData.Field.ResultInlines.Content.Replace("Mister Bean")
        Dim birthdateFieldData = CType(formFieldsData("BirthDate"), FormTextData)
        birthdateFieldData.TextType = FormTextType.Date
        birthdateFieldData.DefaultValue = "1990-01-01"
        birthdateFieldData.ValueFormat = "yyyy-MM-dd"
        birthdateFieldData.HelpText = "Enter your date of birth."
        birthdateFieldData.StatusText = birthdateFieldData.HelpText
        birthdateFieldData.Field.ResultInlines.Content.Replace("1990-01-01")
        Dim genderFieldData = CType(formFieldsData("Gender"), FormDropDownData)
        genderFieldData.Items.Add("Select sex")
        genderFieldData.Items.Add("Male")
        genderFieldData.Items.Add("Female")
        genderFieldData.Items.Add("I don't know")
        genderFieldData.HelpText = "Select your gender."
        genderFieldData.StatusText = genderFieldData.HelpText
        genderFieldData.SelectedItemIndex = 0
        Dim marriedFieldData = CType(formFieldsData("Married"), FormCheckBoxData)
        marriedFieldData.HelpText = "Mark as checked if you are married."
        marriedFieldData.StatusText = marriedFieldData.HelpText
        marriedFieldData.DefaultValue = True
        marriedFieldData.Value = True
        Dim salaryFieldData = CType(formFieldsData("Phone"), FormTextData)
        salaryFieldData.TextType = FormTextType.Number
        salaryFieldData.DefaultValue = "555 13-12"
        salaryFieldData.ValueFormat = "(###) ###-####"
        salaryFieldData.HelpText = "Enter your phone number."
        salaryFieldData.StatusText = salaryFieldData.HelpText
        salaryFieldData.Field.ResultInlines.Content.Replace("+1 (800) 111 2233")
        dc.Save("fields-template.pdf", New PdfSaveOptions() With {.PreserveFormFields = True})
        
        System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo("fields-template.pdf") With {.UseShellExecute = True})
    End Sub
End Module
See Also