LimitPageTable by Robin S

Allows "Add New" buttons in a PageTable inputfield to be disabled when a defined limit is reached.

LimitPageTable

A module for ProcessWire CMS/CMF. Allows limits and restrictions to be placed on selected PageTable fields.

Usage


Install the LimitPageTable module.

For the PageTable field you want to limit, on the "Input" tab include "template" or "template.label" in "Table fields to display in admin". You can skip this step if your PageTable field only allows a single template.

In the module config, fill out the fields in the fieldset row:

  • PageTable field you want to limit (required)
  • Roles that restrictions will apply to (required)
  • Template you want to limit (only needed if your PageTable field allows more than one template)
  • Field you have included in the "Table fields to display in admin" setting (only needed if your PageTable field allows more than one template)
  • Limit
  • Option to prevent drag sorting of items (affects all rows regardless of template)
  • Option to prevent trashing of items (affects all rows regardless of template)
  • Option to disable all "Add" buttons for any template

You can add rows as needed using the "Add another row" button.

If you are using translated text for the default PageTable "Add New" button then enter the translation in "Text for default 'Add New' button".

Please note that limits and restrictions are applied with CSS/JS so should not be considered tamper-proof.

License


Released under Mozilla Public License v2. See file LICENSE for details.

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

Latest news

  • ProcessWire Weekly #522
    In the 522nd issue of ProcessWire Weekly we'll check out the latest core updates, introduce a new module called File Mover, and more. Read on!
    Weekly.pw / 11 May 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK