Author

Profile Image Aytekin Tank is founder of JotForm. He currently leads the JotForm development team. He loves to hear from JotForm users. Feel free to shoot him an email at aytekin at jotform.com.


Welcome to the JotForm blog, where you can read about new JotForm features and find helpful online form tips for creating top-notch forms, user case studies, and much more.

Feel free to stay a while, drop a comment or two, laugh at our corny jokes, and make sure to share the articles you like on social media.




How The Washington Post gets the most out of JotForm using our API

April 30, 2015

Most users enjoy the simplicity of JotForm. Build a form, post it on your website, and receive email notifications every time someone responds. This keeps a great many JotForm customers happy. Sometimes you want to do more with the information you collect, though. Perhaps you want to build a web page based on your form responses. For this JotForm gives you a full API to access your data whenever you want.


The Washington Post recently found JotForm to be the right tool for a special project. They set up a jotform to collect information on cooking classes. The goal was to create a dynamically constructed web page that would connect to JotForm and post the latest updates on the class.

Cooking Class Illustration
Illustration by Shelly Tan

One option was to export all your data to a spreadsheet and then build a web page from it. But then every time someone would submit a new cooking class, the page would have to be updated manually. For this situation, JotForm’s API was born. It allows web developers to gather information from their JotForm account and update their web page on the fly.


Working with APIs requires knowing how to write code. It’s a powerful tool that gives users full control over their forms and data in order to manage them however they like. We’ll leave our help docs to explain the finer details, but generally, first you set up an API key to access it, then you use that key to send or request information to the API.


In The Washington Post’s case, what they wanted was all the submissions that had been received on their cooking class form. For those who want a closer look, here’s the API call that they needed. Enter your form ID, along with an API key specific to your account and receive your submissions. If you’re curious, and currently logged into your JotForm account, you can test it out through our API interface in the documentation. Just enter your Form ID, and see the results. This makes ensuring you have the right API calls easy.


JotForm API Sample


When building dynamic applications certain design considerations come up. What if they receive thousands of submissions? You can’t (or shouldn’t) display them all on a single page. What you need is pagination, where the user has a next and previous button to navigate through them. This can be done in one of two ways:


- download everything all at once and handle the pagination within the application

- make a new call to the API for every page


For these, the API call can be sent a couple options- limit and offset. You can tell it you’d like the next 20 submission results, starting at result 500, for instance. This gives developers the ability to request exactly the information they need.


In The Washington Post’s case, they ultimately decided to download and display all the data at once, and list them on a single, searchable page. The data set wasn’t that big, so it worked nicely for their case. The end result is here, and is a great example of getting the most out of JotForm by using its API.

http://www.washingtonpost.com/cookingclasses


4 Comments...


   
Chad Reid (April 30, 2015 at 04:11 PM)

It's really neat to see how people use the API!


   
steve (May 04, 2015 at 03:22 PM)

If you haven't used JotForm's API, you're missing out!


   
EltonCris (May 04, 2015 at 09:19 PM)

It's just fantastic when apps can communicate with one another!


   
lafototeca (May 05, 2015 at 12:26 PM)

I wish I knew a little bit more so I could use the API. I'm this close to fully understand it.

View Answer


Send Comment