Retrieve Parameters - adammcarth/instance.js GitHub Wiki

If at some point you've added some parameters to your Instance Model, you can retrieve them at any time. Perhaps you might want to use them to show the person's name in a thank you message? Yeah that sounds cool, let's do that...

var ContactForm = new Instance();

.get( attribute );

var name = ContactForm.get("name");

alert("Thanks, " + name + ". Your message has been sent!");

You can also get all of the attributes associated with the Instance by leaving out the arguments from the .get() method:

var all_parameters = ContactForm.get();

console.log(all_parameters);
// => { name: "Adam", email: "blah", message: "Hello, world!" }