About Button Fieldtype

Field that stores 3 values for label, target and class (CSS). Output markup configurable in field settings.

Category 1Field Types
Fieldtype modules that represent a data type used by fields.
Category 2Input Fields
Inputfield modules that provide a UI input widget in the ProcessWire admin.
Category 3Language Modules
Modules involved in providing multi-language support.
Category 4Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Module Version1.0.9
Class NameFieldtypeButton
Compatibility2.7, 3.0
Date AddedJune 21, 2016
Last UpdatedApril 17, 2019
Recommended ByNew recommendations may take up to 1 day to appear.


This module's files should be placed in /site/modules/FieldtypeButton/
How to install or uninstall modules



ProcessWire Module Fieldtype to easily create and edit buttons for the frontend.

The returned value is an instance of Button. Direct output provided.

Button properties

With the button object the following properties are provided:

Defined in field settings

|:-|:-| | html | Markup for the output. Placeholders can be used. Define placeholders by surrounding property names with curled brackets. If a property is an object use dot syntax to get subproperties. |

Defined in inputfield

|:-|:-| | label | Page object if detected as internal page, default: NULL | | target | Relative paths will be translated to page (if exists). Placeholders (e.g. language home segments) can be used @see html  | | class | CSS class |

Generic properties

|:-|:-| | targetPage | Page object if detected as internal page, default: NULL |

Language specific properties

|:-|:-| | language | Language object (current user language) | | lang | Language home segment | | langNonDefault | Language home segment appended by a slash or empty string if default language | | langFor<homeSegment> | E.g. langForEn. Language home segment appended by a slash. Provided only if user language matches, otherwise an empty string will be returned | |label<languageID> | E.g. label1234. Language specific button label. |