DynaPDF.CreateCheckBox
----------------------

This function creates a check box.

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

MBS( "DynaPDF.CreateCheckBox"; PDF; Name; ExpValue; Checked; Parent; PosX; PosY; Width; Height ) 

**MBS**( **"DynaPDF.CreateCheckBox";** /\* This function creates a check box. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Name**; /\* Name of the text fielde.g. "IsMale" \*/   
**$ExpValue**; /\* Export value (required)e.g. "IsMale" \*/   
**$Checked**; /\* If 1, the check box appears checked. Else pass 0 for unchecked.e.g. 0 \*/   
**$Parent**; /\* Parent group field if any or -1.e.g. -1 \*/   
**$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 | "IsMale" |
| ExpValue | Export value (required) | "IsMale" |
| Checked | If 1, the check box appears checked. Else pass 0 for unchecked. | 0 |
| Parent | Parent group field if any or -1. | -1 |
| 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 check box.  
See CreateCheckBox function in dynapdf\_help.pdf for details.  
  
See also [DynaPDF.SetCheckBoxChar](DynaPDFSetCheckBoxChar.md), [DynaPDF.SetCheckBoxState](DynaPDFSetCheckBoxState.md) and [DynaPDF.SetFieldHighlightMode](DynaPDFSetFieldHighlightMode.md).  
See also [CreateCheckBox](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateCheckBox.shtml) function in DynaPDF manual.

### Examples

Create a check box:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.CreateCheckBox"; $pdf ; "Check1"; "Ja"; 0; -1; 156; 148-14; 14; 14) \]  
Create three radio buttons together:

 Set Variable \[ $RadioButton ; Value: MBS ("[DynaPDF.CreateRadioButton](DynaPDFCreateRadioButton.md)"; $pdf ; "Type"; "Type1"; False; -1; 70; 746; 13; 13) \]  
Set Variable \[ $Checkbox1 ; Value: MBS ("DynaPDF.CreateCheckBox"; $pdf ; ""; "Type2"; False; $RadioButton ; 70; 722; 13; 13) \]  
Set Variable \[ $Checkbox2 ; Value: MBS ("DynaPDF.CreateCheckBox"; $pdf ; ""; "Type3"; False; $RadioButton ; 70; 698; 13; 13) \]  
### See also

- [DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md)
- [DynaPDF.CreateComboBox](DynaPDFCreateComboBox.md)
- [DynaPDF.CreateJSAction](DynaPDFCreateJSAction.md)
- [DynaPDF.CreateListBox](DynaPDFCreateListBox.md)
- [DynaPDF.CreateRadioButton](DynaPDFCreateRadioButton.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetCheckBoxChar](DynaPDFSetCheckBoxChar.md)
- [DynaPDF.SetCheckBoxState](DynaPDFSetCheckBoxState.md)
- [DynaPDF.SetFieldHighlightMode](DynaPDFSetFieldHighlightMode.md)

### Example Databases

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

### Blog Entries

- [MBS Filemaker Plugin, version 4.1pr4](https://www.mbsplugins.de/archive/2014-03-09/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 11st March 2025

  
[DynaPDF.CreateButton](DynaPDFCreateButton.md) - [DynaPDF.CreateComboBox](DynaPDFCreateComboBox.md)

[HTML Version](DynaPDFCreateCheckBox.shtml)