JavaScript Overview

Ninja Forms provides developers JavaScript hooks, similar to WordPress hooks in PHP, for creating custom functionality.

An installable plugin example, including a custom field, a custom field template, and custom JavaScript validation is available on GitHub.

A Brief Overview

The Client Side of Ninja Forms THREE is powered by a Backbone/Marionette JavaScript application using the AMD pattern.

  • Backbone is the JS library (which leverages jQuery and Underscores)
  • Marionette is the JS Framework (built on Backbone)
  • The AMD Pattern (Asynchronous Module Definition) is an organizational structure which uses a message bus for event driven architecture.

With all of that said, a lot of functionality is written for you, but there are some cases where you may need to extend the core functionality.

Similar to WordPress, the Ninja Forms JavaScript provides hooks for extending functionality.