Use Cases Forms
Form control component
This is a component that is part of the Prysm custom components suite and makes it possible to create working forms inside Prysm.
More about the form control component you can check here.
Using the forms polyfill will make it possible to define forms with the HTML
<form> element. When the polyfill is initialized it will iterate over the whole DOM tree and replace all the
<form> tags with the form control component enabling you to directly run a page that contains
<form> elements without replacing them with the Prysm component.
<form> has a
<form> element inside then the inner form won’t be replaced because nested forms are forbidden by standard.
The polyfill is located inside the
Samples/uiresources/Forms. We provide two builds of the polyfill - a
umd and a
cjs bundle located inside
Usage with UMD modules
Import the forms polyfill directly in an HTML page:
Note: You will need an appropriate module bundler if you are importing ES modules. Another way is adding your script to the HTML with the
type="module" attribute -
<script src="myscript.js" type="module"></script>.
Usage with CJS modules
Import the forms polyfill:
The CommonJS(CJS) modules are used in a NodeJS environment, be sure to use a module bundler to use them.
There are default styles that are optional for the polyfill. We advise you to import them as well. They are located inside
You can directly add them to the
<head> of your HTML page:
<link rel="stylesheet" href="./builds/umd/forms-polyfill-styles.css">