Actions
This page is the action index. Use it to see which actions are supported in the current browser runtime and then click through to the detailed action pages.
What Actions Are
Actions are browser-side workflow steps processed by the BetterForms actions queue.
Use them to:
navigate or open UI elements
run browser-side JavaScript
trigger named actions
call FileMaker through actions such as
runUtilityHook
Actions are not the same thing as FileMaker hooks. Hooks are server-side scripts; actions are client-side workflow steps that may call those hooks.
Core Actions
showCardModal / hideCardModal
Opens or closes a card modal that renders another page
Authentication Actions
These special actions allow you to create custom login and registration pages. See this page for more:
Authentication ActionsMessaging Actions
Payment Actions
OAuth Actions
PWA Actions
pwaPromptPushPermission
Requests push-notification permission and registers the browser subscription
AI / Tooling Actions
llmToolCallResponse
Sends a frontend tool result back to the tool-response service
Usage
Actions can run from many places:
$$BF_Actionspayloads returned from supported FileMaker hooksnavigation menu items
page elements such as buttons
named actions
*_actionsschema keys (where supported)
Wherever you see an actions key in BetterForms, it can be either:
a single action object
an array of action objects to run in sequence
$$BF_Actions - Actions Array
$$BF_Actions is the browser action array that applicable FileMaker hooks can return.
Each array element is one action object. BetterForms queues them and runs them in order.
For user-facing docs and custom scripts, clear queued actions with the public BetterForms helper:
Other places you can use actions
actionsBeforeComplete can be added to schema.form and BetterForms will run that action array when present.
The Action Object
action
string
The name of the action
function
string
{optional} All actions can also take a function. This is processed just before the action is executed. This function can be an JS code and can also easily change the action parameters itself of any other environmental value. This is handy for pre-processing data prior to an action.
preventClone
boolean
false
{optional} When true, BetterForms does not strip object references before running the action array. By default, actions are cloned so they are decoupled from the original objects that created them.
nonBlocking
boolean
false
{optional} When added to the action and true, the actions processor will not wait for the action to complete before starting the next action. This is useful when you have a blocking action but still want other things to run (like slow process utility hooks)
options
object
This object may be optional depending on the specific settings needed by a given action.
function On Any Action
function On Any ActionAny action object can also include a function key. When present, BetterForms runs that JavaScript just before the action executes.
Use this for pre-processing or mutating the action/options just before the action runs.
This is different from the standalone function action, which is itself the action being executed.
Calling Named Actions
Triggering Actions on Field Changes
All field element types support an onChanged_actions key. This key can contain actions that will be run when the elements data model changes.
Clearing Actions
Last updated
Was this helpful?