Need form to populate from table in Database

Permalink
Hi folks,

I have a quote form that I built in Formify. I am guessing I will need to create an external form to achieve my goal. However, I am hoping not and am open to suggestions here.

What we have...
3 SELECT Dropdowns (state, manufacturer, model). Each state has different manufacturers and each manufacturer has different models. So, the SELECT dropdowns will dynamically load different options based on what the user selects.

What we want to do.....
1. Populate select dropdowns with data from a secondary database. I know how to include a second DB connection already.

2. Based on what is selected by the user, this would generate a quote.

3. When the user decides it's good, they can click "ENROLL" and have the data from the short "Quote" form populated into the corresponding fields on the longer Enrollment form.

Any guidance here would be MUCH appreciated. Thanks in advance!

 
hutman replied on at Permalink Reply
hutman
The best way to do this would probably be to populate the State dropdown (assuming that this is not dynamic from another database) and give it a "Field Class". Then create a custom template for the formify_form block that has some extra javascript in it to watch that class and on change re-populate the Manufacturer and Model selects based on the selected State.

Depending on how much information you have, you could put all the options into a json blob on the page that the javascript reads, or you could create a package with two routes that you get the data from using ajax.