Form Triggers 🧪

Checkbox Trigger

sa-trigger-form-checkbox-on = ( event name )

sa-trigger-form-checkbox-off = ( event name )

Button Trigger

sa-trigger-form-button-click = ( event name )

Show / Hide Fieldset

Usage notes;

Must be a custom element <fieldset> wrapping the elements

sa-action-form-fieldset-show = ( event name )

sa-action-form-fieldset-hide = ( event name )

sa-action-form-fieldset-toggle = ( event name )

Use cases;

  • Show / hide a group of inputs

  • Enable / disable validation automatically

Technical notes;

  • Uses disabled on the fieldset directly, to novalidate all of the fields within so that the form can be submitted with the fields hidden

Last updated

Was this helpful?