npm install
using the terminal application.new Formio
as the other methods require. These methods can be used as globals that are able to define the behavior of the JavaScript SDK and all instances created afterward. These methods are as follows.Formio.setBaseUrl(baseUrl)
:baseUrl/status
If this shows the version of the server, then you know this is the value of the base URL.Formio.setProjectUrl(projectUrl)
Formio.fetch(...)
Formio.request(url, [method], [data], [header], [opts])
Formio.makeStaticRequest(url, [method], [data], [opts])
Formio.setToken(token)
Formio.getToken()
Formio.setUser(user)
/current
with your current JWT token. This user object is then stored within localStorage as formioUser
unless a different namespace
option is being used./current
endpoint.Formio.getUser()
Formio.currentUser([formio], [opts])
/current
API endpoint.Formio.accessInfo([formio])
Formio.setProjectUrl()
before calling this method.Formio.projectRoles([formio])
Formio.setProjectUrl()
before calling this method.Formio.clearCache()
Formio.logout([formio], [opts])
Formio.pageQuery()
Formio.ssoInit([type], [options])
Formio.requireLibrary(name, property, src, [polling])
Formio.libraryReady(name)
Formio.loadProjects([query], [opts])
baseUrl
of the SDK.Formio.serialize(obj, [interpolate])
formio.loadProject([query], [opts])
formio.saveProject(project, [opts])
formio.deleteProject([opts])
formio.loadForms([query], [opts])
formio.getTempToken(expire, allowed, [options])
formio.loadRoles([opts])
formio.getProjectId()
formio.accessInfo()
formio.currentUser()
formio.loadForm([query], [opts])
formio.saveForm(form, [opts])
formio.deleteForm([opts])
formio.getFormId()
formio.loadSubmissions([query], [opts])
formio.loadActions([query], [opts])
formio.availableActions()
formio.actionInfo(name)
formio.loadSubmission([query], [opts])
formio.saveSubmission(submission, [opts])
formio.deleteSubmission([opts])
formio.getDownloadUrl([form])
formio.uploadFile(storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback)
formio.downloadFile(file, [options])
formio.deleteFile(file, [options])
formio.loadAction([query], [opts])
formio.saveAction(action, [opts])
formio.deleteAction([opts])
formio.loadRole([opts])
formio.saveRole(role, [opts])
formio.deleteRole([opts])
formio.isObjectId(id)
formio.userPermissions([user], [form], [submission])
formio.canSubmit()
Formio.registerPlugin(plugin, [name])
Formio.getPlugin(name)
Formio.deregisterPlugin(plugin)
deregister
function on the plugin before deregistering. The plugin
argument can be the instance of the plugin or the optional name given when registered. Returns true if the plugin was successfully deregistered, false if the plugin does not exist.preRequest(requestArgs)
requestArgs
is an object that contains the following properties:formio
: The Formio instance calling the request.type
: The type of resource being requested (ex: form, forms, submission).url
: The url being requested.method
: The HTTP request method.data
: The HTTP request body, if any.opts
: Any opts given to the request