Nested Checkboxes

An inputfield for Page Reference fields that groups options by their parent page.

An inputfield for Page Reference fields that groups options by their parent page, and optionally by grandparent page too.

This can help editors understand the grouping of the selectable pages, and also makes it quicker for an editor to select or unselect an entire group of pages.

Screen recording

The checkboxes at the parent and grandparent level are not for storing those pages in the field value - only for quickly selecting or unselecting groups of pages at the lowest level of the hierarchy. For example, in the screen recording above the "Cities" Page Reference field allows only pages with the "city" template, and the pages at the country and continent level are not included in the field value.

The inputfield is only for use with Page Reference fields because the structure comes from the page tree.

Requires PW >= v3.0.248.

Configuration


For each field that uses the inputfield you have these options:

  • Checkboxes structure: choose "Parents" or "Parents and grandparents".
  • Collapse sections that contain no checked checkboxes: this option makes the inputfield more compact.
  • There are also the standard column width and column quantity options familiar from the InputfieldCheckboxes inputfield. These apply to the selectable pages at the lowest level of the hierarchy, and the structure is arguably more readable when these are left at their defaults.

More modules by Robin S

  • Hanna Code Dialog

    Enhances the use of Hanna tags in CKEditor fields, including the dialog-based editing of Hanna tags.
  • Connect Page Fields

    Allows the connecting of two related Page fields so that changing one updates the other.
  • Minimal Fieldset

    Adds a config option to fieldsets to render them without label or padding in Page Edit.
  • Template Field Widths

    Quickly set the widths of inputfields in a template.
  • Custom Inputfield Dependencies

    Extends inputfield dependencies so that inputfield visibility or required status may be determined at runtime by selector or custom PHP code.
  • Breadcrumb Dropdowns

    Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.
  • Auto Template Stubs

    Automatically creates stub files for templates when fields or fieldgroups are saved.
  • Dynamic Options

    A Fieldtype for dynamic options that are generated at runtime via a hook.
  • Custom Admin Menus

    Adds up to three custom dropdowns to the main admin menu.

All modules by Robin S

Install and use modules at your own risk. Always have a site and database backup before installing new modules.