Hook
Navigation hooks — connect JavaScript logic to determine next steps.
Last updated
Was this helpful?
Navigation hooks — connect JavaScript logic to determine next steps.
Last updated
Was this helpful?
Attribute: sf-goto = hook(HOOK_NAME)
Where: Navigation elements, radio buttons, or radio button groups, checkboxes, or checkbox groups.
Description: Determine the next move with JavaScript logic.
Add the sf-goto="hook(HOOK_NAME)"
attribute to your navigation element, such as the next button.
Then, register the hook using the . See the example below.
Configuring navigation does not require any extra attributes. Just ensure the attribute key is sf-goto
and the value is hook(HOOK_NAME)
. Here are some instructions to keep in mind:
The hook should follow the format hook(YOUR_HOOK_NAME)
.
Do not register multiple hooks with the same name. The default nature of hook registration is to override.
Hook names should not contain any spaces or symbols.
Here are some dos and don'ts:
→ Read more about the registerNavigationHook
method .