# CMB2 Conditionals

[![Join the chat at https://gitter.im/jcchavezs/cmb2-conditionals](https://badges.gitter.im/jcchavezs/cmb2-conditionals.svg)](https://gitter.im/jcchavezs/cmb2-conditionals?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Total Downloads](https://poser.pugx.org/jcchavezs/cmb2-conditionals/downloads)](https://packagist.org/packages/jcchavezs/cmb2-conditionals)
[![License](https://poser.pugx.org/jcchavezs/cmb2-conditionals/license)](https://packagist.org/packages/jcchavezs/cmb2-conditionals)

**Contributors:**      [jcchavezs](https://github.com/jcchavezs), [jrfnl](https://github.com/jrfnl)
**Tags:**              cmb2, conditionals, metaboxes  
**Requires at least:** 3.8.0  
**Tested up to:**      4.3  
**Stable tag:**        1.0.4  
**License:**           GPLv2 or later  
**License URI:**       [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)  

## Description

**CMB2 Conditionals** is a plugin for [CMB2](https://github.com/WebDevStudios/CMB2) which allows developers to relate fields so one of them could only appear when one other have an specific value or when is not empty.

To get started, please follow the examples in the included `example-functions.php` file.

## Requirements

- PHP 5.2.4+
- Wordpress 3.8+
- CMB2

## Contribution
All contributions welcome. If you would like to submit a pull request, please check out the [master branch](https://github.com/jcchavezs/cmb2-conditionals/tree/master) and pull request against it. Please read the [CONTRIBUTING](https://github.com/jcchavezs/cmb2-conditionals/blob/master/CONTRIBUTING.md) doc for more details.

A complete list of all our awesome contributors found here: [github.com/jcchavezs/cmb2-conditionals/graphs/contributors](https://github.com/jcchavezs/cmb2-conditionals/graphs/contributors)

## Installation

If installing the plugin from wordpress.org:

1. Upload the entire `/cmb2-conditionals` directory to the `/wp-content/plugins/` directory.
2. Activate CMB2 Conditionals through the 'Plugins' menu in WordPress.
2. Copy (and rename if desired) `example-functions.php` into to your theme or plugin's directory.
2. Edit to only include the fields you need and rename the functions.
4. Profit.
