Skip to content

toriphes/wp-graphql-ninja-forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPGraphQL Ninja Forms

A WordPress plugin that Adds Ninja Forms functionality to WPGraphQL schema.

WARNING: this plugin is under development and it's not production ready!

Installation

  1. Install and activate WPGraphQL wordpress plugin
  2. Install and activate Ninja Forms wordpress plugin
  3. Clone or download the zip of this repository into your WordPress plugin directory and activate WPGraphQL Ninja Forms

Features

  • Query forms with their related fields
  • Submit one or multiple form entries using mutations

Get a form and its fields

{
  form(id: "1", idType: DATABASE_ID) {
    title,
    fields {
      nodes {
        fieldId
        label
        type
      }
    }
  }
}

Submit a form entry

{
  submitForm(input: {formId: 1, data: [
    {id: 1, value: "Julius"}, 
    {id: 2, value: "[email protected]"}, 
    {id: 3, value: "Hello there"}
  ]}) {
    errors {
      fieldId
      message
      slug
    }
    message
    success
  }
}

About

Adds Ninja Forms Functionality to WPGraphQL schema

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages