carlcs/craft-checkboxfield

There is no license information available for the latest version (v1.0.1) of this package.

Checkbox Field plugin for Craft CMS

v1.0.1 2016-02-02 17:19 UTC

This package is auto-updated.

Last update: 2024-11-20 04:44:06 UTC


README

Checkbox Field Type

This plugin provides a field type that looks exactly like Craft's default Checkboxes field, but stores a boolean value to the database (similar to the Lightswitch field), so you can use a custom field parameter in your ElementCriteriaModel.

Installation

To install the plugin, copy the checkboxfield/ folder into craft/plugins/. Then go to Settings → Plugins and click the "Install" button next to "Checkbox Field".

Usage

Custom field parameter usage:

{% set entries = craft.entries.myCheckbox(1).myOtherCheckbox(0) %}

Field Type Settings

Uncheck "Show field name and instructions" to hide the field's name and it's instructions. This also removes the top margin, to make multiple Checkbox fields look like Craft's default Checkboxes field with multiple options.