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
Ensure the Proview SDK script is loaded (see Getting Started).2. Initialize credential
The SDK supports Firebase as a credentialing provider for authentication.3. Initialize form module
Initialize the form module with the Firebase credential.4. Access user object
Once initialized, the user object becomes available globally atProview.user and is Firebase-compatible with getIdToken() method.
5. Mount UI
Mount the form UI into a container element.6. Open form
Open the form to load data and display the UI.7. Subscribe to events
Listen to form lifecycle events.8. Teardown
When done, unmount the UI.API Reference
Proview.form.init(options)
Creates a form module instance with integrated authentication.
Input
FormModule
Proview.user after initialization.
form.mount(options)
Mounts the form UI into a container element.
MountOptions
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 that can be passed to any Proview SDK module initialization.
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:

