Files
Ophir LOJKINE 7457370b8d Add toast notification component with JS init, template, examples, migration, and tests (#1360)
* Support hash-triggered toasts

* Address toast review feedback

* Render toast positioning in template

* Avoid reopening initialized toasts

* Fix white toast foreground color

* Configure toasts declaratively

* Simplify toast template styling

* Address toast accessibility reviews
2026-08-03 15:50:18 +02:00
..
2024-11-26 23:26:09 +01:00
2026-06-02 15:56:27 +02:00

Custom form component

This example shows how to create a simple custom component in handlebars, and call it from SQL.

It uses MySQL, but it should be easy to adapt to other databases. The only MySQL-specific features used here are:

  • json_table, which is supported by MariaDB and MySQL 8.0 and later,
  • MySQL's json_merge function.

Both have analogs in other databases.

screenshot

Key features illustrated in this example

  • How to create a custom component in handlebars, with dynamic behavior implemented in JavaScript
  • How to manage multiple-option select boxes, with pre-selected items, and multiple choices
  • Including a common menu between different pages using a shell.sql file, the dynamic component, and the sqlpage.run_sql function.