Archives

Form Object API

Fields

Retrieving the Field Model <?php // Returns a Field Model for Field ID 1 $model = Ninja_Forms()->form()->field( 1 )->get(); // Returns a Field Model for Field ID 1 $model = Ninja_Forms()->form()->get_field( 1 ); // Returns an array of Field Models …

Continue reading

Forms

Retrieving form, field, action, and object models <?php // Returns an Form Model for Form ID 1 Ninja_Forms()->form( 1 )->get(); // Returns an array of Form Models for All Forms Ninja_Forms()->form()->get_forms(); // Returns an array of Field Models for Form …

Continue reading

Actions

Retrieving the Action Model <?php // Returns an Action Model for Action ID 1 Ninja_Forms()->form()->action( 1 )->get(); // Returns an Action Model for Action ID 1 Ninja_Forms()->form()->get_action( 1 ); // Returns an array of Action Models for Form ID 1 …

Continue reading

Submissions

Retrieving the Submission Model <?php // Returns an Submission Model for Submission ID 1 Ninja_Forms()->form()->sub( 1 )->get(); // Returns an Submission Model for Submission ID 1 Ninja_Forms()->form()->get_sub( 1 ); // Returns an array of Submission Models for Form ID 1 …

Continue reading

Objects

Retrieving the Object Model <?php // Returns an Object Model for Object ID 1 Ninja_Forms()->form()->object( 1 )->get(); // Returns an Object Model for Object ID 1 Ninja_Forms()->form()->get_object( 1 ); // Returns an array of Object Models for Form ID 1 …

Continue reading