DynaPDF.GetTextFieldValue
-------------------------

The function returns the value of a text field.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [4.0](newinversion40.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetTextFieldValue"; PDF; Field ) 

**MBS**( **"DynaPDF.GetTextFieldValue";** /\* The function returns the value of a text field. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Field**) /\* The field index or field name.e.g. "FirstName" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Field | The field index or field name. | "FirstName" |

### Result

Returns the text or an error.

### Description

The function returns the value of a text field.  
See also [GetTextFieldValue](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetTextFieldValue.shtml) function in DynaPDF manual.

### Examples

List fields with text values:

 Set Variable \[ $count ; Value: MBS ("[DynaPDF.GetFieldCount](DynaPDFGetFieldCount.md)"; $pdf ) \]   
Set Variable \[ $index ; Value: 0 \]   
If \[ $index &lt; $count \]   
 Loop  
 # your script steps here  
 Set Variable \[ $name ; Value: MBS ( "[DynaPDF.GetFieldName](DynaPDFGetFieldName.md)"; $PDF ; $index ) \]   
 Set Variable \[ $value ; Value: MBS ( "DynaPDF.GetTextFieldValue"; $PDF ; $index ) \]   
 Show Custom Dialog \[ "Form field" ; $name &amp; ": " &amp; $value \]   
 #   
 # next  
 Set Variable \[ $index ; Value: $index + 1 \]   
 Exit Loop If \[ $index &gt;= $count \]   
 End Loop  
End If  
### See also

- [DynaPDF.GetField](DynaPDFGetField.md)
- [DynaPDF.GetFieldCount](DynaPDFGetFieldCount.md)
- [DynaPDF.GetFieldExpValue](DynaPDFGetFieldExpValue.md)
- [DynaPDF.GetFieldName](DynaPDFGetFieldName.md)
- [DynaPDF.GetTextFieldDefaultValue](DynaPDFGetTextFieldDefaultValue.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetTextFieldValue](DynaPDFSetTextFieldValue.md)
- [DynaPDF.SetTextFieldValueEx](DynaPDFSetTextFieldValueEx.md)

### Blog Entries

- [MBS Filemaker Plugin, version 4.1pr3](https://www.mbsplugins.de/archive/2014-03-04/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 23th December 2021

  
[DynaPDF.GetTextFieldDefaultValue](DynaPDFGetTextFieldDefaultValue.md) - [DynaPDF.GetTextRise](DynaPDFGetTextRise.md)

[HTML Version](DynaPDFGetTextFieldValue.shtml)