RockOptionsApi

Module for easy manipulation of option-fields via API

ProcessWire module for easy manipulation of option-fields via API

$page->getOptions('yourfield')
  ->add('foo')
  ->remove('bar')
  ->save();

optionsapi.gif

Readonly options field renderer


By default options fields that are set to readonly via the locked collapse state only show selected options and hide other available options. That might not be what you want. Here is an alternative that turns this:

write.png

Into that:

read.png

Simply call $form->readonlyOptions('yourfield') in the ProcessPageEdit::buildForm hook or when using MagicPages in the editForm() method:

$wire->addHookAfter("ProcessPageEdit::buildForm", function($event) {
  $form = $event->return;
  $form->readonlyOptions('yourfield');
});

More modules by bernhard

  • RockFinder

    Highly Efficient and Flexible SQL Finder Module
  • RockMigrations

    The Ultimate Automation and Deployment-Tool for ProcessWire
  • RockFrontend

    Module for easy frontend development
  • RockFinder3

    Combine the power of ProcessWire selectors and SQL.
  • RockLESS

    Module to parse LESS files via PHP.
  • Template Preview Images

    Show Preview Images for selectable Templates
  • RockMigrations1

    Module to handle Migrations inside your Modules easily.
  • RockHeadlineIDs

    Demo Textformatter
  • RockLite

    MailerLite Integration

All modules by bernhard

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