WebView.GetFormCount
--------------------

Returns the number of forms on the website which is currently visible in the web viewer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [1.6](newinversion16.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "WebView.GetFormCount"; WebViewerRef ) 

**MBS**( **"WebView.GetFormCount";** /\* Returns the number of forms on the website which is currently visible in the web viewer. \*/  
**$WebViewerRef**) /\* Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. |  |

### Result

The number of forms found on the website.

### Description

Returns the number of forms on the website which is currently visible in the web viewer.   
May not work for websites with frames.  
  
Alternative you can run JavaScript to query document.forms.length yourself.  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [WebView.GetForm](WebViewGetForm.md)
- [WebView.GetFormValue](WebViewGetFormValue.md)
- [WebView.GetImageCount](WebViewGetImageCount.md)
- [WebView.GetLinkCount](WebViewGetLinkCount.md)

This function checks for a license.

Created 18th August 2014 , last changed 28th September 2021

  
[WebView.GetFormButtonValue](WebViewGetFormButtonValue.md) - [WebView.GetFormInputChecked](WebViewGetFormInputChecked.md)

[HTML Version](WebViewGetFormCount.shtml)