Giter Site home page Giter Site logo

ninjaform's Introduction

Ninjaform

Installation

npm

to install with npm use npm install --save ninjaform

bower

to install with bower use bower install --save ninjaform

include the <vendor-path>/js/ninjaform.js and the <vendor-path>/css/ninjaform.css where <vendor-path> is node_modules or bower_components depending on how you installed into your page and init it

Manual instllation

You can install it manually by cloning this repo or download the .zip file and copying the .js and .css files into your project

Initializatition

$('#ninjaform').ninjaform({ 
  'token':'<your RD Token>', 
  'secret':'<your RD app secret>', 
  'fields':{ 
    'estado':['PR','SC','SP','RS'], 
    'nível':['Iniciante','Intermediário','Avançado','Ninja'] 
  } 
});

Options:

(String) token: your RD API token, available in your API page

(String) secret: your RD API secret, available in your API page

(object) fields: an object containing a set of custom fields that you want to add to your form. (Currently only supports arrays and converts it to tags (String) actionURL: URL to the RD API - defaults to "https://www.rdstation.com.br/api/1.2/conversions" (String) namespace: namespace to prepend to the classes of the generated elements - defaults to ninjaform (Boolean) modal: if set to true, will create a modal and put the form inside of it, and make all matched elements to open the modal when clicked - defaults to false (Boolean) wrapper: if set to true, will create <div> tags around the inputs - defaults to true (Boolean) bootstrap: if set to true, will put bootstrap classes into the form and its wrappers (if they exist, of course) - defaults to true Example You can check the testpage.html file and the src/testpage folder to see a basic working example.

ninjaform's People

Contributors

paulitolinhares avatar

Stargazers

Prajakta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.