Skip to main content
Version: Upcoming 🦄

Webview

The Webview is used to safely display a website or a video file in the Form. It can be used to place a YouTube video within the Form, for example.

<div
id="webview_ctrl"
data-hf-control="Webview"
data-hf-options="{
url: 'https://www.youtube.com/embed/xF6pEMT97W4',
type: 'website',
height: 270,
width: 460
}"
></div>

FormControl Options​

type - required​

Define the type of the resource. Be careful though, youtube-urls for example are of type website! Videofiles are links to actual videofiles (eg. mpeg files)
How to use:
type: 'website'
Type: 'website' | 'videofile'

url - required​

URL to the resource that should be presented in the webview control.
Type: string

height​

The height of the webview ctrl in pixels; if no value is provided, the webview is set to 100 % of the containing element.
How to use:
height: 270
Type: number

hidden​

Hide FormControl in Form.
How to use:
hidden: true
Type: boolean

width​

The width of the webview ctrl in pixels; if no value is provided, the webview is set to 100 % of the containing element.
How to use:
width: 460
Type: number