Type Default Value Read Only Description

[Visual Basic]
"" No The field value.




This property allows you access to the value of the field.

You may wish to assign or query the form field value using this property.

  • Text fields have a free-text value.
  • Checkboxes and Radio Buttons have a value which is either "Off" or the on-state of the control as specified in the Options.
  • Combo Boxes and List Boxes have values restricted to a set of selections as specified in the Options property.
  • Pushbuttons and Signatures do not have a value.

Some fields are associated with JavaScript which may be used for validation or formatting. In the case that you assign a value which causes an exception in the JavaScript, that exception will be propagated up the chain and will cause a corresponding C# exception to be raised. If you do not want to run such script, set the Doc.Form.UseFieldScript property to false.

Common Operations.

Set the value of a text field:

theField.Value = "Mr Jones";

[Visual Basic]
theField.Value = "Mr Jones"

Set a checkbox:

theField.Value = theField.Options[0];

[Visual Basic]
theField.Value = theField.Options(0)

Clear a checkbox:

theField.Value = "Off";

[Visual Basic]
theField.Value = "Off"

Set the fifth Radio Button in a group:

theField.Value = theField.Options[4];

[Visual Basic]
theField.Value = theField.Options(4)

Multiline Form Fields Tip.

When inserting carriage returns into multiline form fields use carriage returns (\r) only.

Using line feeds (\n) or a carriage return linefeed combination (\r\n) is less compatible with older versions of Acrobat.