## Form::HasField(const System::SharedPtr\<Field\>\&) method


Check if the form already has specified field.

```cpp
bool Aspose::Pdf::Forms::Form::HasField(const System::SharedPtr<Field> &field)
```


| Parameter | Type | Description |
| --- | --- | --- |
| field | const System::SharedPtr\<Field\>\& | [Field](../../field/) to check. |

### ReturnValue

**true** if the specified field name added to [Form](../); otherwise, **false**.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Field](../../field/)
* Class [Form](../)
* Namespace [Aspose::Pdf::Forms](../../)
* Library [Aspose.PDF for C++](../../../)
## Form::HasField(const System::String\&) method


Determines if the field with specified name already added to the [Form](../).

```cpp
bool Aspose::Pdf::Forms::Form::HasField(const System::String &fieldName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | const System::String\& | [Field::PartialName](../) or [Annotation::FullName](../) of the field. |

### ReturnValue

**true**
## Remarks



if the specified field name added to [Form](../); otherwise, **false**

. 
## See Also

* Class [String](../../../system/string/)
* Class [Form](../)
* Namespace [Aspose::Pdf::Forms](../../)
* Library [Aspose.PDF for C++](../../../)
## Form::HasField(const System::String\&, bool) method


Determines if the field with specified name already added to the [Form](../), with ability to look into children hierarchy of fields.

```cpp
bool Aspose::Pdf::Forms::Form::HasField(const System::String &fieldName, bool searchChildren)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fieldName | const System::String\& | [Field::PartialName](../) or [Annotation::FullName](../) of the field. |
| searchChildren | bool | When set to **true**

the whole hierarchy of form fields would be searched for the requested *fieldName*  (note that in this case the [Annotation::FullName](../) of the required field should be passed as *fieldName* ). |

### ReturnValue

**true**
## Remarks



if the specified field name added to [Form](../); otherwise, **false**

. 
## See Also

* Class [String](../../../system/string/)
* Class [Form](../)
* Namespace [Aspose::Pdf::Forms](../../)
* Library [Aspose.PDF for C++](../../../)
