Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ChuckMac/ninja-forms-acf-field
Advanced Custom Fields: Ninja Forms Field
https://github.com/ChuckMac/ninja-forms-acf-field
Last synced: 27 days ago
JSON representation
Advanced Custom Fields: Ninja Forms Field
- Host: GitHub
- URL: https://github.com/ChuckMac/ninja-forms-acf-field
- Owner: ChuckMac
- License: gpl-3.0
- Archived: true
- Created: 2015-06-17T15:43:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-15T13:47:58.000Z (almost 8 years ago)
- Last Synced: 2024-08-03T17:10:38.596Z (4 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 5
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-acf - Ninja Forms - select one or many Ninja Forms. (Third-Party Add-Ons)
README
Ninja-Forms-ACF-Field
=======================This is an Advanced Custom Field custom field to select one or many [Ninja Forms](https://ninjaforms.com/).
This provides a field that lets you select from a list of active Ninja Forms.
Compatibility
============This add-on will work with:
* ACF version 5
Installation
============This add-on can be treated as both a WP plugin and a theme include.
*Plugin*
1. Copy the 'ninja-forms-acf-field' folder into your plugins folder
2. Activate the plugin via the Plugins admin page*Include*
1. Copy the 'ninja-forms-acf-field' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-gravity_forms.php file)```
include_once('acf-ninja_forms.php');
```Using the field
===============The field lets you pick one or many fields.
The data returned is either a Form settings array or, for multiple values, an object of [Form settings arrays](http://www.gravityhelp.com/documentation/page/Form_Object).
The following example will work with single or multiple form entries.
```
display( $ninja_form['id'] );
} elseif( class_exists( 'Ninja_Forms' ) && is_object( $ninja_form ) ){ // Ninja forms 3.x
foreach ($ninja_form as $form) {
Ninja_Forms()->display( $form['id'] );
}
}
?>
```You can find out more about the ninja forms functions to embed a form or form data on a page in their [documentation](http://docs.ninjaforms.com/category/29-global-variables)
Versioning
=====Since this is a drop-in plugin, we will make sure that versioning happens according to the main plugin.
Credits
=======Thanks to Adam Pope of [Storm Consultancy](http://www.stormconsultancy.co.uk) for the [Gravity Forms ACF Field](https://github.com/stormuk/Gravity-Forms-ACF-Field) plugin which this is based on.
And in turn, Lewis Mcarey for the [Users Field ACF add-on](https://github.com/lewismcarey/User-Field-ACF-Add-on) on which the Gravity Forms ACF field was based.