Save Form Data to JSON

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:03
    Save Form Data to JSON
  • 0:06
    With Leanna Pelham
  • 0:07
    Saving Pets
  • 0:08
  • 0:09
    Let's talk about saving pets.
  • 0:11
    No, not like rescuing them, though that's really cool too.
  • 0:16
    I'm talking about being able to submit our new pet form
  • 0:19
    and saving that pet information somewhere so
  • 0:21
    that shows up on our site.
  • 0:24
    I want to make our pet list truly dynamic.
Loading ...

Save Form Data to JSON


We can now read the POST data from our form, but we can't really do much with it long term. We aren't saving the information anywhere. In this tutorial you are going to learn how to update our pets.json file with new information every time the form gets submitted. Since this is an important file for us to be able to use and read, we'll also quickly look at how to keep the human-readable formatting in place as we make our updates.

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.