AJAX field to populate other fields

By: Jose Ramirez | Asked: 04/11/2025
ForumsCategory: General questionsAJAX field to populate other fields
Jose Ramirez asked 2 weeks ago

I want to know if anyone has done this before and can help me.
Example: I have form that has a zip code field, I want to get data in to a couple fields using json without submitting information.
once the zip code field is filled, it will reach out to:https://developer.nrel.gov/api/utility_rates/v3.json?api_key=YOUR_KEY&address=ZIPCODE
once the data comes in, I want to get data into the form fields before submitting.
can this be done and how? help!

2 Answers
Rob LeVineRob LeVine Staff answered 2 weeks ago

I've done this many times.  You create jQuery code that makes an Ajax call (calling the URL you indicated above) and then parse the results into the form fields. See a crude example here. If you're not familiar with jQuery, you should hire a developer to help you.

Jose Ramirez answered 2 weeks ago

Rob! thank you so much! this helps a lot!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right