Archives

Developing Add-Ons

Data Conversion

As of Ninja Forms v2.9.36, an upgrade process is included for converting form and setting data to the new setting screens and database structure. Form Settings Filter Hook: ninja_forms_upgrade_settings <?php add_filter( 'ninja_forms_upgrade_settings', 'upgrade_my_form_settings' ); function upgrade_my_form_settings( $form_data ){ $old_setting = $form_data[ …

Continue reading

Registering Plugin Settings

Ninja Forms THREE provides a Settings submenu page for registering plugin settings for both the main plugin as well as add-ons. Settings registered with this system will be displayed and saved by Ninja Forms automatically. Creating a separate setting submenu …

Continue reading

Custom Field Templates

Each template defines how a field, like a textbox, should be rendered. Like the WordPress page and post templating system, Ninja Forms will now look in specific locations for HTML files that represent field templates.” Form Templating Register Template File …

Continue reading

Payment Gateways

Enable Credit Card Fields By default, the credit cards are hidden from the builder. However, these fields can be enabled by adding the following filter in your Payment Gateway Add-on. <?php add_filter( 'ninja_forms_enable_credit_card_fields', '__return_true' ); view raw nf-enable-cc-fields.php hosted with …

Continue reading

Registering Actions

Actions Overview The Ninja Forms Action System is how Ninja Forms processes form submission data. Submission Actions are like modules which can be added to a form. Multiple actions can be added to a single form, and likewise, a single …

Continue reading

Registering Fields

Field Settings The $_settings property accepts an array of settings, following an array format shared with Actions. For a list of accepted settings properties and a list of basic settings, see the article on Settings Configuration. Field Templates Fields Templates …

Continue reading

Settings Configuration

Settings for Actions and Fields are stored as arrays. Each setting should be a sub-array of the class’ $_settings property. Example: /* * Settings */ $this->_settings = array( 'label' => array( 'name' => 'label', 'type' => 'textbox', 'label' => __( 'Label', 'ninja-forms'), 'width' => …

Continue reading