-
Notifications
You must be signed in to change notification settings - Fork 2
Retrieve Parameters
Adam McArthur edited this page Jan 25, 2015
·
4 revisions
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();
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!" }
Did you find this page helpful? Shoot me an email...