📄️ AppContext
App Context is a single storage area shared by the whole application, available from every page and form for as long as the app is open. Use it to hold a value that more than one page needs to see or change, such as a preference set on one screen that should still apply after the user navigates to another. Unlike Page Context and Form Context, App Context's data is automatically saved to the browser's local storage, so it survives a page refresh.
📄️ Canvas Context
Canvas Context gives a form script information about the device the form is currently being viewed on, and about the Form Designer's canvas when the form is open in the designer. Use it to adjust a component's behaviour based on the device it is displayed on, for example hiding a wide table on mobile.
📄️ Form Context
Form Context is a storage area scoped to a single form instance. Use it to hold temporary data that components on that form need to share with each other, without saving it to the form's own data or to the backend. When the form closes, its Form Context and everything stored in it are cleared.
📄️ Page Context
Page Context is a storage area scoped to the current page. Use it to hold temporary data that needs to be shared between the different forms on that page, for example a main form and the SubForms or modal dialogs it opens. When the user navigates away from the page, its Page Context and everything stored in it are cleared.
📄️ Web Storage
Web Storage gives your form scripts access to the browser's storage, so you can persist small pieces of data either for the current browser tab (session storage) or across browser sessions (local storage). It's available anywhere the standard script variables are available, alongside contexts such as formContext and pageContext.
📄️ Component Context
Some form components expose their own data, and in some cases an API of actions, as a named entry in the contexts object, alongside the standard contexts like application and webStorage. Not every component has one - check the context list in the script editor to see what's available for the components on your form.