Alert Forms

Summary

  • AdapTable Alerts can include fully defined Forms in the Notifications
  • These Forms can include as many inputs, buttons and other UI controls as needed

An Alert Definition can be configured so that a Toast Notification is displayed whenever the Alert fires.

By default the Notification will display the Alert's Message - the Header and Text that describe the Alert.

However, additionally, the Notification can be configured to render also an Alert Form.

This is a fully-featured, UI-rich Adaptable Form, containing multiple inputs and controls (with validation).

Hint

For uses cases where a Form is "overkill", a set of Alert Command Buttons can be configured instead

An Alert Form can only be configured by developers at design-time, and requires a 2-step process:

  1. The Form is configured in full in the alertForms section of Alert Options
  2. The Form is referenced by name in the AlertForm property of the Alert Definition in Alert Initial State

Find Out More

The Adaptable Form Guide has full instructions on configuring dynamic Forms with multiple inputs and validation

alertForms

Fully configured Forms to show in Alert Notifications
Adaptable Forms in Alerts
Fork
  • This demo displays an Alert Form when a cell in Github Stars column is given a negative value
  • The Form contains 3 elements:
    • a numeric input which will receive the new value for the Cell
    • a Set button - which will replace the 0 in the Cell with the value provided in the input
    • a Cancel Button - which will revert the Cell to its initial value

Expand to see the Alert Form definition

Try It Out
  • Set a GitHub Stars cell to a negative value and see the Alert Form appear with the input and the 2 buttons
  • Provide a new value and click 'Set' and note how the cell updates
  • Click 'Cancel' and note how the cell reverts to the initial value