DynaPDF.DeleteField
-------------------

This function deletes an interactive form field.

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

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

**MBS**( **"DynaPDF.DeleteField";** /\* This function deletes an interactive form field. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Field**) /\* A field handle. \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

This function deletes an interactive form field.   
The parameter Field must be a valid field handle. If the field is a radio button or group field, the child fields used are also deleted. There is no need to delete each field separately.   
A field is never physically deleted. All field handles are still valid after a field was deleted, but the "Used" flag of the field is set to false (see [DynaPDF.GetField](DynaPDFGetField.md) for further information). If a field contained an action that was not used by another object then the action is also deleted.   
Fields can also be deleted by using its name instead of the handle. See [DynaPDF.DeleteFieldEx](DynaPDFDeleteFieldEx.md) for further information.   
See also [DeleteField](https://www.monkeybreadsoftware.com/DynaPDF-Manual/DeleteField.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.DeleteFieldEx](DynaPDFDeleteFieldEx.md)
- [DynaPDF.DeletePage](DynaPDFDeletePage.md)
- [DynaPDF.FlushPages](DynaPDFFlushPages.md)
- [DynaPDF.GetField](DynaPDFGetField.md)
- [DynaPDF.GetPageField](DynaPDFGetPageField.md)
- [DynaPDF.New](DynaPDFNew.md)

This function checks for a license.

Created 6th February 2015 , last changed 6th February 2015

  
[DynaPDF.DeleteEmbeddedFile](DynaPDFDeleteEmbeddedFile.md) - [DynaPDF.DeleteFieldEx](DynaPDFDeleteFieldEx.md)

[HTML Version](DynaPDFDeleteField.shtml)