PHPackages                             trk/mystique - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. trk/mystique

ActivePw-module

trk/mystique
============

Mystique is a config file based field creation module for ProcessWire CMS/CMF by ALTI VE BIR IT.

v0.0.22(5mo ago)12111[1 issues](https://github.com/trk/Mystique/issues)MITPHPPHP &gt;=7.0CI failing

Since Nov 18Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/trk/Mystique)[ Packagist](https://packagist.org/packages/trk/mystique)[ Docs](https://github.com/trk/Mystique)[ Patreon](https://www.patreon.com/ukyo)[ RSS](/packages/trk-mystique/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Mystique Module for ProcessWire CMS/CMF
=======================================

[](#mystique-module-for-processwire-cmscmf)

[![QUICK VIDEO TUTORIAL](https://camo.githubusercontent.com/ec5fe2a1db28a51e814a18928413093235832887efc137077e4374056f993561/687474703a2f2f696d672e796f75747562652e636f6d2f76692f716b59494f6d4a6d6975552f302e6a7067)](http://www.youtube.com/watch?v=qkYIOmJmiuU)

`Mystique` module allow you to create dynamic fields and store dynamic fields data on database by using a config file.

Requirements
------------

[](#requirements)

- ProcessWire `3.0` or newer
- PHP `7.0` or newer
- FieldtypeMystique
- InputfieldMystique

Installation
------------

[](#installation)

Install the module from the [modules directory](https://modules.processwire.com/modules/mystique/):

Via `Composer`:

```
composer require trk/mystique

```

Via `git clone`:

```
cd your-processwire-project-folder/
cd site/modules/
git clone https://github.com/trk/Mystique.git

```

#### Module in live reaction with your `Mystique config file`

[](#module-in-live-reaction-with-your-mystique-config-file)

This mean if you `remove a field` from your `config file`, field will be removed from edit screen. As you see on `Youtube Video`.

### Mystique module will check these paths for get `config` files

[](#mystique-module-will-check-these-paths-for-get-config-files)

- site/modules/\*/configs/`{Mystique.*.php, mystique.*.php, mystique.*.json, Mystique.*.json}`
- site/templates/configs/`{Mystique.*.php, mystique.*.php, mystique.*.json, Mystique.*.json}`

All config files need to return a `Valid JSON Array` or `PHP array` like examples.

If your config file return a `Closure`, `$page`, `$field` and `$value` will passed to your config

#### Usage almost same with ProcessWire Inputfield Api, only difference is `attr`, `attrs`, `set`, `wrapAttr`, `wrapAttrs` and `showIf` usage like on example.

[](#usage-almost-same-with-processwire-inputfield-api-only-difference-is-attr-attrs-set-wrapattr-wrapattrs-and-showif-usage-like-on-example)

- `site/modules/Mystique/configs/Mystique.magician.php`

```
