What is Form module
The Form module is part of the Proview SDK, exposed asProview.form. It provides a complete solution for loading, rendering, and managing dynamic forms with integrated authentication.
Once initialized, it lets your application:
- Load forms — render forms dynamically by form ID.
- Submit forms — handle form submission and validation automatically.
- Mount UI — display forms in
sidepanel,popup, orinlinelayout modes. - React to events — subscribe to ready, submitted, and error events.
Quickstart
1. Load the SDK and initialize
DeclareProview.form() in the modules array when calling Proview.init(). The dsn and credential are inherited — no per-module init call needed.
2. Access user object
Once initialized, the user object becomes available globally atProview.user and is Firebase-compatible with getIdToken() method.
3. Mount UI
Mount the form UI into a container element.4. Open form
Open the form to load data and display the UI.5. Subscribe to events
Listen to form lifecycle events.6. Teardown
When done, unmount the UI.API Reference
Proview.form
The form module is automatically initialized when Proview.form() is included in the modules array passed to Proview.init(). The dsn and credential are inherited from the global init — no separate per-module call is needed.
Proview.form exposes:
Proview.user after initialization.
form.mount(options)
Mounts the form UI into a container element.
MountOptions
Proview.form.open()
Loads form data and displays the form UI. Uses the formId specified in mount().
FormInstance
User Object
After initializing the form module,Proview.user provides a Firebase-compatible user object accessible globally.
User Interface
Firebase Authentication
Proview.auth.FirebaseAuthStrategy(config)
Creates a Firebase authentication credential for use with the Proview SDK modules.
Input
FirebaseAuthStrategy
A credential object passed to Proview.init(). All modules declared in the modules array inherit it automatically.
Example:
Form Events
TheFormInstance emits events that you can subscribe to using the on() method.
Event names and payloads
Example:
Mount Modes
The form module supports three layout modes for the form UI.
Example:
Error Handling
Form errors follow a consistent structure. Error Structure
Example:

