Other functions
toJsonString
Convert lua table to json string
Arguments
- table:
dynamicthe table to convert
Return String
local jsonString = toJsonString(table)
openDeepLink
Open a deep link (other app)
Arguments
- url:
Stringthe url to open
Return `void
openDeepLink('https://www.instagram.com/')
openSnackBar
Open a snack bar with given config
Arguments
- config:
SnackBarConfigthe config
Return void
openSnackBar({ ['message'] = 'Hello World!', ['duration'] = 3, ['color'] = 'red' })
openPopup
Open a popup bar with given onSuccess call and config
Arguments
- onSuccess:
Stringthe function to call when the popup is with success action - config:
popupConfigthe same config as described in Button component
Return void
openPopup(
'on_success_fn()',
{
['title'] = 'My Title',
['content'] = 'My content',
['on_cancel'] = 'on_cancel_fn()',
['actions'] = {
{ ['text'] = 'OK', ['action'] = 'ok'},
{ ['text'] = 'Cancel', ['action'] = 'cancel'},
{ ['text'] = 'nope', ['action'] = 'quit' }
}
})
getFormTemplates
Get templates linked to the current form.
Return List<FormTemplate>
local allTemplates = getFormTemplates()
getFormTemplateByName
Get the template linked to the current form with the given name.
Arguments
- name:
Stringthe name of the template to get
Return FormTemplate
local template = getFormTemplateByName('my_template')
Table
| Function Name | Description | First Argument | Second Argument | Return |
|---|---|---|---|---|
| toJsonString | Convert lua table to json string | table: the table to convert | String | |
| openDeepLink | Open a deep link | url:the url to open | Void | |
| openSnackBar | Open a snack bar with given config | config: the config | Void | |
| openPopup | Open a popup bar with given onSuccess call and config | onSuccess: the function to call when the popup is with success action | config: the same config as described in Button component | Void |
| getFormTemplates | Get templates linked to the current form | List<FormTemplate> | ||
| getFormTemplateByName | Get the template linked to the current form with the given name | name: the name of the template to get | FormTemplate |