showAlert

Displays a non‑blocking toaster/notification alert.

Key
Description

action

showAlert

options.text

Body text for alert

options.title

Title text

options.type

info | warn | error | success

options.position

Position (e.g. top center, bottom left, …)

options.options

object - additional options to the parent options

showAlert is powered by vue-notification. See: vue-notification README


Slot‑based custom HTML (Basecode 3.2.xx+)

Starting in basecode 3.2.xx+, showAlert supports providing a custom HTML template that fully replaces the default notification body. Use either the html or template key in options.

Notes:

  • Your HTML is rendered via the BetterForms html-renderer-old component.

  • When you need access to the vue‑notification slot context, reference it as props.item and props.close() inside your template (not item/close directly).

  • If you don’t need slot props, you can omit them entirely.

Example A – Simple custom body (no slot props)

{
  "action": "showAlert",
  "options": {
    "type": "success",
    "position": "bottom left",
    "html": "<div style=\"padding:12px 14px; border:1px solid #c1ecd5; background:#eaf9f1; border-radius:6px; color:#1f2d3d;\">Operation complete.</div>"
  }
}

Example B – Advanced body using slot props (props.item, props.close)

Tip: Font Awesome classes (e.g., fas fa-check-circle) assume FA is loaded in your app/theme.


FileMaker Custom Function

This CF allows for super easy implementation. Pass additional options in the options object if needed.

Last updated