Download the PHP package hananils/kirby-checkbox-field without Composer
On this page you can find all versions of the php package hananils/kirby-checkbox-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hananils/kirby-checkbox-field
More information about hananils/kirby-checkbox-field
Files in hananils/kirby-checkbox-field
Package kirby-checkbox-field
Short Description Checkbox is a simple field that is a companion of the core toggle field. It offers a single checkbox with label and info text and can be used wherever a single option is required and the "on" and "off" metaphor of a toggle does not suit well.
License MIT
Homepage https://kirby.hananils.de/plugins/checkbox-field
Informations about the package kirby-checkbox-field
Checkbox is a simple field for Kirby that is a companion of the core toggle field. It offers a single checkbox with label and info text and can be used wherever a single option is required and the "on" and "off" metaphor of a toggle does not suit well.
[!NOTE] Please check out the online documentation at kirby.hananils.de/plugins/checkbox-field for further information.
Introduction
Toggles – like the core field – and checkboxes have a lot in common as they both allow users to change the state of a setting. The mental models behind both concepts are different though. While a toggle usually conveys an immediate action, switching a setting "on" or "off" like a lightbulb, ticking a checkbox does not imply an action but communicates consent or disconsent. "Do you agree to the terms of service?" Yes or no.
For all use cases where you don't want to toggle a switch but what to represent a content choice, this field is for you.
[!TIP]
Do you think this should be a core field, too? Go and tell the Kirby team!
Example
The field setup is minimal:
Please note that the label for this field is not displayed above the field but beside the checkbox itself. The label thus represents the option the editor checks or unchecks.
Templating
Just like with the toggle field, a checkbox value can be converted to a proper boolean:
And the field methods isTrue and isFalse can be used to validate a setting and:
Installation
Download
Download and copy this repository to /site/plugins/checkbox-field.
Git submodule
Composer
License
This plugin is provided freely under the hana+nils · Büro für Gestaltung.
We create visual designs for digital and analog media.