DynaPDF.CreateTextField
-----------------------

This function creates a text field.

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

MBS( "DynaPDF.CreateTextField"; PDF; Name; Parent; Multiline; MaxLen; PosX; PosY; Width; Height ) 

**MBS**( **"DynaPDF.CreateTextField";** /\* This function creates a text field. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Name**; /\* Name of the text fielde.g. "Input" \*/   
**$Parent**; /\* Parent group field if any or -1.e.g. -1 \*/   
**$Multiline**; /\* Enable multi line text output.e.g. 0 \*/   
**$MaxLen**; /\* Maximum length of the text or 0.e.g. 0 \*/   
**$PosX**; /\* X-Coordinate of the text field.e.g. 100 \*/   
**$PosY**; /\* Y-Coordinate of the text field.e.g. 100 \*/   
**$Width**; /\* Width of the text field.e.g. 100 \*/   
**$Height**) /\* Height of the text field.e.g. 20 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Name | Name of the text field | "Input" |
| Parent | Parent group field if any or -1. | -1 |
| Multiline | Enable multi line text output. | 0 |
| MaxLen | Maximum length of the text or 0. | 0 |
| PosX | X-Coordinate of the text field. | 100 |
| PosY | Y-Coordinate of the text field. | 100 |
| Width | Width of the text field. | 100 |
| Height | Height of the text field. | 20 |

### Result

Returns field handle or error.

### Description

This function creates a text field.  
See CreateTextField function in dynapdf\_help.pdf for details.  
See also [CreateTextField](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateTextField.shtml) function in DynaPDF manual.

### Examples

Create a text field:

 Set Variable \[$f ; Value:MBS ( "DynaPDF.CreateTextField"; $pdf ; "Val1"; -1; 0; 0; 50; $y ; 200; 20)\]  
### See also

- [DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md)
- [DynaPDF.CreateGroupField](DynaPDFCreateGroupField.md)
- [DynaPDF.CreateJSAction](DynaPDFCreateJSAction.md)
- [DynaPDF.CreateSigField](DynaPDFCreateSigField.md)
- [DynaPDF.CreateSigFieldAP](DynaPDFCreateSigFieldAP.md)
- [DynaPDF.FreeTextAnnot](DynaPDFFreeTextAnnot.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFieldBorderColor](DynaPDFSetFieldBorderColor.md)
- [DynaPDF.SetFieldFlags](DynaPDFSetFieldFlags.md)
- [DynaPDF.SetNumberFormat](DynaPDFSetNumberFormat.md)

### Example Databases

- [DynaPDF/Create Form](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Form.shtml#2ScriptAnchor_)
- [DynaPDF/Create PDF with sum form field](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20PDF%20with%20sum%20form%20field.shtml#2ScriptAnchor_)
- [DynaPDF/Form/Form](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Form/Form.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Advent calendar - Door 6 - Sending Out Wishlist Forms](https://www.mbsplugins.de/archive/2024-12-06/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [MBS @ FMTraining.TV - The FileMaker MonkeyBread Plug-in Q&amp;A](https://www.mbsplugins.de/archive/2024-07-03/MBS_@_FMTrainingTV_-_The_FileM/monkeybreadsoftware_blog_filemaker)
- [PDF Forms with MBS Plugin](https://www.mbsplugins.de/archive/2018-04-21/PDF_Forms_with_MBS_Plugin/monkeybreadsoftware_blog_filemaker)
- [Tip of the day: DynaPDF form creation with calculation with FileMaker](https://www.mbsplugins.de/archive/2016-08-24/Tip_of_the_day_DynaPDF_form_cr/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.1pr4](https://www.mbsplugins.de/archive/2014-03-09/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2022, Seite 19 bis 20](https://filemaker-magazin.de/neuigkeit/4172-Appetithappen-FMM_202201)

This function checks for a license.

Created 18th August 2014 , last changed 18th October 2016

  
[DynaPDF.CreateSubmitAction](DynaPDFCreateSubmitAction.md) - [DynaPDF.CreateURIAction](DynaPDFCreateURIAction.md)

[HTML Version](DynaPDFCreateTextField.shtml)