DynaPDF.GetFieldIndex
---------------------

Returns the page index or tab order of the field.

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

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

**MBS**( **"DynaPDF.GetFieldIndex";** /\* Returns the page index or tab order of the field. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Field**) /\* The field index or field name.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. | "FirstName" |

### Result

Returns value or error.

### Description

Returns the page index or tab order of the field.   
The index of newly created fields starts at 1000. This makes it easier to set a field to another position inside the tab order. The field index can be changed with the function [DynaPDF.SetFieldIndex](DynaPDFSetFieldIndex.md). Note that fields must be sorted by index with the function DynaPDF.SortFieldsByIndex. Fields must be sorted for each page separately.  
  
This is for tab order index. For index of field in the list of fields, please use [DynaPDF.FindField](DynaPDFFindField.md).  
See also [GetFieldIndex](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetFieldIndex.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.FindField](DynaPDFFindField.md)
- [DynaPDF.GetFieldName](DynaPDFGetFieldName.md)
- [DynaPDF.GetFieldType](DynaPDFGetFieldType.md)
- [DynaPDF.GetGlyphIndex](DynaPDFGetGlyphIndex.md)
- [DynaPDF.SetFieldColor](DynaPDFSetFieldColor.md)
- [DynaPDF.SetFieldDate](DynaPDFSetFieldDate.md)
- [DynaPDF.SetFieldFlags](DynaPDFSetFieldFlags.md)
- [DynaPDF.SetFieldFontEx](DynaPDFSetFieldFontEx.md)
- [DynaPDF.SetFieldIndex](DynaPDFSetFieldIndex.md)
- [DynaPDF.SetFieldName](DynaPDFSetFieldName.md)

This function checks for a license.

Created 18th August 2014 , last changed 9th October 2018

  
[DynaPDF.GetFieldHighlightMode](DynaPDFGetFieldHighlightMode.md) - [DynaPDF.GetFieldMapName](DynaPDFGetFieldMapName.md)

[HTML Version](DynaPDFGetFieldIndex.shtml)