DynaPDF.AddFieldToFormAction
----------------------------

Adds a field to a form action.

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

MBS( "DynaPDF.AddFieldToFormAction"; PDF; ActionHandle; FieldHandle; Include ) 

**MBS**( **"DynaPDF.AddFieldToFormAction";** /\* Adds a field to a form action. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$ActionHandle**; /\* Handle of a submit or reset form action. \*/   
**$FieldHandle**; /\* Handle of a field that should be added to array. \*/   
**$Include**) /\* Include or exclude this field from submitting?  
Pass 0 to exclude or 1 to include.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| ActionHandle | Handle of a submit or reset form action. |  |
| FieldHandle | Handle of a field that should be added to array. |  |
| Include | Include or exclude this field from submitting?   Pass 0 to exclude or 1 to include. | 0 |

### Result

Returns OK or error.

### Description

Adds a field to a form action.  
Instead of simply submitting all field values of an interactive form to a web server, it is also possible to submit the values of specific fields only. A submit form and reset form action can hold an optional array of fields which can be included or excluded from the action. For example, if a form contains 20 fields which all should be submitted to the web server apart from two of those fields, then add the two fields to the submit form action and set the parameter Include to false.   
Note, that parameter Include is handled reversed if the submit flag sfExclude is set (see also [DynaPDF.CreateSubmitAction](DynaPDFCreateSubmitAction.md), [DynaPDF.CreateResetAction](DynaPDFCreateResetAction.md)). The fields are then excluded if Include is true and vice versa.   
See also [AddFieldToFormAction](https://www.monkeybreadsoftware.com/DynaPDF-Manual/AddFieldToFormAction.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.CreateResetAction](DynaPDFCreateResetAction.md)
- [DynaPDF.CreateSubmitAction](DynaPDFCreateSubmitAction.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 13.3**
    - Added [DynaPDF.AddFieldToFormAction](https://www.mbsplugins.eu/DynaPDFAddFieldToFormAction.shtml), [DynaPDF.CreateResetAction](https://www.mbsplugins.eu/DynaPDFCreateResetAction.shtml) and [DynaPDF.CreateSubmitAction](https://www.mbsplugins.eu/DynaPDFCreateSubmitAction.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.3](https://www.mbsplugins.de/archive/2023-07-25/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.3pr1](https://www.mbsplugins.de/archive/2023-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 13th May 2023 , last changed 14th May 2023

  
[DynaPDF.AddDeviceNSeparations](DynaPDFAddDeviceNSeparations.md) - [DynaPDF.AddFontSearchPath](DynaPDFAddFontSearchPath.md)

[HTML Version](DynaPDFAddFieldToFormAction.shtml)