Multi page form, trigger API call or function on page 2 load

Multi page form, trigger API call or function on page 2 load

I have a multi page form.  On page one is basic info: Name, email, address, phone, etc.

Page 2 would look like this:

Checkbox - "By checking this box you agree that you may have to travel up to XX miles for your internship"
Text Field, read only - XX miles  (calculated and prefilled from API call)

I already have an API call I can run to pass in zip code and return the data I need (a single number).  I don't need assistance with the API Call, this is done.  But how I can I trigger this API call on the load of Page 2 (or submission of page 1) of the form and then prefill a field?

- Kevin



Or if there are any other, out of the box ways someone knows this could be done, that would be amazing. Thanks.