Ninja Form=8 is used when creating a new Campaign where the user selects the cause. This form provides the fields for collecting information needed to create the Campaign or used by the theme to display the Campaign. Generally to set the field “abc”, use a field key of “abc”; that is, the field with key
post_title sets the
post_title of the Campaign post. The exception is the thumbnail image; since a field key that starts with underscore (_) is illegal, a key with “thumbnail_id” sets the post_meta field of “_thumbnail_id”.
The plugin provides an extension to Ninja Forms for selecting items whose key ends in “_causeid”. By having a field with key kids_causeid, that
select field is populated with a drop-down of the titles of all items of custom_post_type “kids” with values of their post ID. Likewise, the field with key “projects_causeid” populates a drop-down with the titles and IDs of all “projects”.
The plugin also provides an extension to Ninja Forms for setting the post_meta. Any form field that is not already handled (such as
post_title) and doesn’t end in “_” (which indicates autogenerated field keys) is used in update_post_meta.
Use Form=8 when creating a new Campaign from a top-level part of the website and use Form=10 when creating a new Campaign from the display of a Cause.