DynaPDF.CheckFieldNames
-----------------------

Checks all currently defined interactive form fields for invalid duplicate field names.

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

MBS( "DynaPDF.CheckFieldNames"; PDF ) 

**MBS**( **"DynaPDF.CheckFieldNames";** /\* Checks all currently defined interactive form fields for invalid duplicate field names. \*/  
**$PDF**) /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |

### Result

Returns number or error.

### Description

Checks all currently defined interactive form fields for invalid duplicate field names.   
Use this function if multiple interactive forms were imported. DynaPDF does not check or change duplicate field names during import. Therefore, check the field names and change invalid names if necessary before closing the document. If an interactive form contains duplicate field names of fields with different types, the document will be damaged.   
If a form contains invalid duplicate field names, the names must be changed with [DynaPDF.SetFieldName](DynaPDFSetFieldName.md). However, if such a field is used in a JavaScript action or by a global JavaScript, the JavaScript(s) must also be changed to avoid error messages in Adobe's Acrobat.   
Global JavaScripts can be accessed with the function [DynaPDF.GetJavaScript](DynaPDFGetJavaScript.md) and changed with the function [DynaPDF.ChangeJavaScript](DynaPDFChangeJavaScript.md). A JavaScript action can be accessed with the function [DynaPDF.GetJavaScriptAction](DynaPDFGetJavaScriptAction.md) and changed with the function [DynaPDF.ChangeJavaScriptAction](DynaPDFChangeJavaScriptAction.md).   
The function returns the handle of the first invalid field name that was found, that is a value greater or equal zero. If no invalid field name was found the return value is -1.  
See also [CheckFieldNames](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CheckFieldNames.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeJavaScript](DynaPDFChangeJavaScript.md)
- [DynaPDF.ChangeJavaScriptAction](DynaPDFChangeJavaScriptAction.md)
- [DynaPDF.GetFieldName](DynaPDFGetFieldName.md)
- [DynaPDF.GetJavaScript](DynaPDFGetJavaScript.md)
- [DynaPDF.GetJavaScriptAction](DynaPDFGetJavaScriptAction.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFieldName](DynaPDFSetFieldName.md)

### Release notes

- **Version 8.5**
    - Added [DynaPDF.CheckFieldNames](http://www.mbsplugins.eu/DynaPDFCheckFieldNames.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 8.5pr3](https://www.mbsplugins.de/archive/2018-10-24/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd October 2018 , last changed 22nd October 2018

  
[DynaPDF.CheckEmbeddedFileCheckSum](DynaPDFCheckEmbeddedFileCheckSum.md) - [DynaPDF.CircleAnnot](DynaPDFCircleAnnot.md)

[HTML Version](DynaPDFCheckFieldNames.shtml)