DynaPDF.GetFieldAsJSON
----------------------

Queries one form fields as JSON object.

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

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

**MBS**( **"DynaPDF.GetFieldAsJSON";** /\* Queries one form fields as JSON object. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Field**) /\* The field index or field name.  
Zero based and up to [DynaPDF.GetFieldCount](DynaPDFGetFieldCount.md)-1.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.   Zero based and up to [DynaPDF.GetFieldCount](DynaPDFGetFieldCount.md)-1. | "FirstName" |

### Result

Returns JSON or error.

### Description

Queries one form fields as JSON object.  
See TPDFFieldEx structure in DynaPDF help, which we convert to JSON for you.  
  
Keys include Deleted, BBox, FieldType, GroupType, Handle, BackColor, BackColorSP, BorderColor, BorderColorSP, BorderStyle, BorderWidth, CharSpacing, Checked, CheckBoxChar, DefState, Description, EditFont, ExpValCount, ExpValue, FieldFlags, FieldFont, FontSize, FieldName, HighlightMode, IsCalcField, MapName, MaxLen, ChildrenCount, Children, Parent, PageNum, Rotate, TextAlign, TextColor, TextColorSP, TextScaling, ToolTip, UniqueName, Value, WordSpacing, PageIndex, Barcode, Signature, ModDate, CaptionPos, DownCaption, DownImage, RollCaption, RollImage, UpCaption, UpImage, OC, Action, Action and Events.  
  
Added FullyQualifiedFieldName as field for v14.0.  
  
The description for a signature field includes the signature dictionary with the metadata for the signature like the certificate, the name, the contact info and the reason. You can take the base64 encoded certificate, add header/footer and load it with X509.Read function to inspect.  
See also [GetFieldAsJSON](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetFieldEx.shtml) function in DynaPDF manual.

### Examples

Query JSON for one field by name:

 Set Variable \[ $JSON ; Value: MBS ( "DynaPDF.GetFieldAsJSON"; $PDF ; "FirstName" ) \]  
Query JSON for one field by index:

 Set Variable \[ $JSON ; Value: MBS ( "DynaPDF.GetFieldAsJSON"; $PDF ; 0 ) \]  
### See also

- [DynaPDF.GetActionsAsJSON](DynaPDFGetActionsAsJSON.md)
- [DynaPDF.GetField](DynaPDFGetField.md)
- [DynaPDF.GetFieldColor](DynaPDFGetFieldColor.md)
- [DynaPDF.GetFieldCount](DynaPDFGetFieldCount.md)
- [DynaPDF.GetFieldFlags](DynaPDFGetFieldFlags.md)
- [DynaPDF.GetFieldIndex](DynaPDFGetFieldIndex.md)
- [DynaPDF.GetFontAsJSON](DynaPDFGetFontAsJSON.md)
- [DynaPDF.GetFontsAsJSON](DynaPDFGetFontsAsJSON.md)
- [DynaPDF.New](DynaPDFNew.md)
- [X509.Read](X509Read.md)

### Release notes

- **Version 14.0**
    - Added FullyQualifiedFieldName as new field for [DynaPDF.GetFieldAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldAsJSON.shtml) and [DynaPDF.GetFieldAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldAsJSON.shtml) results.
- **Version 11.0**
    - Fixed [DynaPDF.GetFieldAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldAsJSON.shtml) and [DynaPDF.GetFieldsAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldsAsJSON.shtml) to return ActionType with that key name instead of Action twice.
- **Version 10.5**
    - Added [DynaPDF.GetAnnotationAsJSON](https://www.mbsplugins.eu/DynaPDFGetAnnotationAsJSON.shtml), [DynaPDF.GetColorSpaceAsJSON](https://www.mbsplugins.eu/DynaPDFGetColorSpaceAsJSON.shtml), [DynaPDF.GetEmbeddedFileAsJSON](https://www.mbsplugins.eu/DynaPDFGetEmbeddedFileAsJSON.shtml), [DynaPDF.GetFieldAsJSON](https://www.mbsplugins.eu/DynaPDFGetFieldAsJSON.shtml) and [DynaPDF.GetFontAsJSON](https://www.mbsplugins.eu/DynaPDFGetFontAsJSON.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 13.6pr1](https://www.mbsplugins.de/archive/2023-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.0pr6](https://www.mbsplugins.de/archive/2021-01-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 10.5](https://www.mbsplugins.de/archive/2020-11-23/New_in_MBS_FileMaker_Plugin_10/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr1](https://www.mbsplugins.de/archive/2020-10-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Embrace JSON](https://www.mbsplugins.de/archive/2020-09-29/Embrace_JSON/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 26](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function checks for a license.

Created 19th September 2020 , last changed 3th December 2024

  
[DynaPDF.GetField](DynaPDFGetField.md) - [DynaPDF.GetFieldBackColor](DynaPDFGetFieldBackColor.md)

[HTML Version](DynaPDFGetFieldAsJSON.shtml)