config_toggle

Toggle a configuration value. Used in the admin, for instance when displaying a “live” checkbox the state of which should reflect a config value.

The required module and key arguments identify the entry. On click, the action stores the triggering input's triggervalue; for a checkbox this is its new checked value. Only editable administrators may change configuration.

{% wire id="feature-enabled" action={config_toggle module="mod_example" key="enabled"} %}

Edit on GitHub