InputfieldTextareaMarkup by Teppo

Markup, plain text and optionally values from other fields as a non-editable, run-time field visible in Page Edit.

Textarea Markup inputfield for ProcessWire CMS/CMF

Textarea Markup inputfield for ProcessWire CMS/CMF. Copyright (c) 2014-2019 Teppo Koivula

Intended for outputting markup as help or commentary among other inputfields, mainly in Page Edit context. Loosely based on InputfieldMarkup from core, but extends textarea to allow overriding markup on a per page basis by superuser.

Getting started


Copy (or clone with git) InputfieldTextareaMarkup folder to /site/modules/, go to Admin > Modules, hit "Check for new modules" and install Textarea Markup.

After installing the module create new "Textarea" field and configure it to use TextareaMarkup as it's inputfield. Via "Input" tab in field settings you can set default output for the field and optionally hide field label entirely.

Fied output can be configured on a per-page basis by superusers, otherwise default value from field settings is used. Output can contain text, HTML markup and values from other fields.

To output values of other fields, embed names of those fields in your output string using format {{field_name}}. Example:

Hello world, I'm a {{template}}, my name is {{name}} and my ID is {{id}}!

For basic-page with ID 1001 and name "About" this should output following:

Hello world, I'm a basic-page, my name is About and my ID is 1001!

In addition to field names, this module supports following custom tags:

  • {{strtotime:+2 weeks|j.n.Y}}: pass given string (in this example +2 weeks) to strtotime() function, and if an optional format string is provided (in this example j.n.Y), format the resulting timestamp according to it with date().

License


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(See included LICENSE file for full license text.)

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

Twitter updates

  • Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we’ll take a closer look at in this post— More
    11 June 2021
  • ProcessWire 3.0.179 adds great new admin theme customization tools that put you in full control over the Uikit admin styles— More
    28 May 2021
  • ProcessWire updates for week of 21 May 2021— More
    22 May 2021

Latest news

  • ProcessWire Weekly #370
    In the 370th issue of ProcessWire Weekly we're going to check out the latest version of the commercial FormBuilder module, introduce a couple of brand new third party modules, and more. Read on!
    Weekly.pw / 12 June 2021
  • ProcessWire FormBuilder v50 updates
    Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we'll take a closer look at in this post.
    Blog / 11 June 2021
  • 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