We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11887
    • 34 Posts
    Hi

    So far my eForm does the following:

    - saves fields to a database using eForm2db, and dynamically populates form from that DB too (very cool)
    - uses some jQuery to automatically update a price in realtime whenever a form element is changed (checkbox, select box, etc.)

    Now I want to dynamically generate a price based on a driving distance from a given location.

    I’m currently looking at this extremely cool script which takes ’fuzzy’ addresses (town names, postal codes, whatever) and calculates driving distances using Google Maps API.

    Problem is, I’m finding it hard to integrate it into my eForm. One clearly cannot have a secondary form that feeds its results into the main form within one page, can one?

    Ideally I’d like it to work like this:

    - Enter your name
    - Enter a date
    - Enter your venue location (fuzzy address)
    - [Submit button runs the script and finds distance, enters distance into hidden input field to save it to DB, updates quote price, and keeps address shown within the body of the form]
    - Fill in remainder of fields in form
    - [Submit button to complete the quotation request]

    Can anyone point me towards some ideas for how to get this to work?

    Thanks!

    Mat