Jump to content

Recommended Posts

Posted

Nested Checkboxes

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.

 

https://github.com/Toutouwai/InputfieldNestedCheckboxes
https://processwire.com/modules/inputfield-nested-checkboxes/

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...