Capturing Data on Multistep form to send to an API

by StevenPatz   Last Updated January 12, 2018 22:07 PM

I am connecting to an API that returns some data based on a user's zipcode. This data needs to be included in the payload of a second call to the API along with sone other form values.

I wanted to build the webform as a multistep, the first page collects the zip code and after the Next Page is clicked, do an API call to send the zipcode and save the response from that call, so that on the second page the Submit sends via another API call that response data plus all of the form values.

This Get the draft data in the webform hook_form_FORM_ID_alter() seems to be the answer but not quite.

Tags : 8 webform

Related Questions

Webform Rules - Create a Drupal User

Updated November 24, 2017 14:07 PM

Hide webform after the user's first submission

Updated May 16, 2017 17:07 PM

How to get instant result after submitting webform?

Updated September 14, 2017 12:07 PM