Field calculations in a request a quote form can sometimes get sticky. Such as when multiple variables are involved. That's when you might prefer something a bit simpler. Lookup Fields can take the place of field calculations (READ: math)! Check out this scenario for building a WordPress quote request form for a hospitality business.
When calculated fields don't cut it
We recently looked at how Formidable’s calculated fields can help streamline your business processes. My case study of the window cleaner who cut admin workload by 25% involved using calculations to build an online quote form.
Formidable’s calculated fields work for many online quotation forms. However, every business is unique and presents specific challenges when building online estimators and quote calculators. This often means it’s a struggle to translate the options you give your customers into a simple equation. Sometimes the variables are too many or complex to be able to rely on calculations alone. Sometimes the variables are difficult to translate into calculations when a simple addition or percentage change can't give an accurate price. It's an issue I've faced as a website developer a number of times.
I'm going to show you how to make a complex quote calculator simple with Lookup Fields. Lookup Fields are a newer addition to the Formidable Forms features. I wish I'd discovered this feature of Formidable Forms earlier. It would have saved me days of hard work—and some very complex and roundabout math—to make my early WordPress quote request form calculators work!
A scenario showing Lookup Fields as a better option
THE PROJECT: Using the example of a vacation/accommodation business, we're going to build an online quote form. Our fictional website visitors can use it to choose multiple add-on options and get an accurate pricing quote for their stay.
THE PROBLEM: We want to create a user-friendly WordPress quote request form that handles a large array of variables. Using our example of a vacation/accommodation business, the accommodation options we offer our customers amount to 81 separate combinations. It would be complex and time consuming to create calculated fields for these.
THE SOLUTION: Instead of using calculated fields, we're going to use Lookup Fields. This requires the use of two forms:
- the actual quotation form
- a price list form that the customer doesn't see
All the options and prices will reside in the price list form. The actual quote form will use Formidable’s Lookup Fields to drill down to the price list form and return the quote "on the fly".
How it works—the short explanation
The key to the entire solution is that two forms are created.
The first is a price list form. It has entries for all the possible option combinations and the price for each configuration. This is the form that only admin sees. Commonly, the entries of this form are populated via CSV import. This saves time and makes it easier to ensure that a price is set for all possible combinations.
The second form is the User Form that users see on the front end of the website. It uses Lookup Fields to dynamically populate the options from the entries of the price list form and drill down to the final value.
Our Example: a request a quote form for a vacation business
In this tutorial we're going to build a quotation form for a vacation/accommodation business. Our example form will have four categories of options. But many more are possible, and this can be as complex as your business needs.
Our customers will have a choice of:
- Room type (Standard, Deluxe or Suite),
- Package type (Room only, Bed & Breakfast or All Inclusive), as well as
- Spa Package Option (half day or full day), and
- Day Tour Option (1 or 2 Day tours).
Step 1: Build the Price List Form
First, we'll start with building the Price List Form that customers won't see. This form will be linked internally behind the scenes to the actual request a quote form the customer will use on the front end.
As you can see, I've titled this form "Pricing Matrix." I've added four dropdown fields—one for each of the four categories of options mentioned above.
I also added a "Price" field.
Below is a look at several possible option combinations, each of which has its own price. Even for our simple example with four categories of options, there are 81 possible combinations of options. Manually populating a price for every combination of options would be overly time consuming. This is where the CSV import & export features of Formidable are really useful.
Format your CSV file for populating your Price List Form
Here’s a handy tip if you're not sure how to properly format your CSV file. Manually fill out one or two entries in your Price List Form and then export the entries. Open the exported file and there you’ll have your columns set up for you. Simply add to it from there. You only need to fill out the user-editable fields; columns for timestamp, entry key, IP, etc. can be left blank. Add one row for each possible combination of options, until all are covered.
Import your CSV file
Once your CSV is complete with all your rows of possible combinations, go into the Import/Export section of Formidable’s main admin menu and import the CSV. After the initial file upload screen, you'll be able to check that the columns in your CSV file are being mapped to the correct entry fields in your form, and adjust which columns are mapped to which fields.
NOTE: If your pricing changes in the future, you can simply edit the appropriate entry or entries in this form to update the results that will be shown in your quote calculator form.
Step 2: Build the online quotation form
Now we have the Price List Form complete, the next task is to build the User Form that will be visible on the front end of your website. This request a quote form will contain the same four categories of options as our Price List Form, and will dynamically retrieve the price from the entries of the Price List Form, depending on the user-selected options.
Start by adding your Lookup Fields
To achieve this data retrieval functionality, we will build our User Form using Lookup Fields for the four categories of options. We'll add four Lookup Fields, and use the "dropdown" option. Title them the same as the fields in your Price List Form.
On each field set the "Get options from" box to indicate the title of your Price List Form, and select the corresponding category of options (column title).
Add a “Read Only” number field in your request a quote form
Now add a number field to display the price. This field should be set to “Read Only” to prevent users from modifying the price that is returned by the form.
Your number field needs to retrieve the price from the Price List Form based on the options selected in the User Form. To achieve this we use the Dynamic Values part of the Field Options.
Set up Dynamic Values
First, check the box that says "Lookup value: Dynamically retrieve the value from a Lookup field."
In the "Get value from" section, select your Price List Form, and then select the column of data that contains the prices.
Finally we need to filter the result for the selected options, so we set up the "Watch Lookup fields" section—adding each option field once.
Step 5: Publish and test your WordPress quote request form
Publish your User Form on a page and test its functions. It should dynamically look up and display the price to match the options selected by your website visitors. Here’s a basic look at how it displays on the front end. (I haven’t spent time on styling.)
BONUS: Make your WordPress quote request form work for you
Allowing potential customers to generate a quotation is helpful. But if you stop there you may lose out on business. Here are three bonus ideas to help you maximize this quote functionality.
- Use the power of email. Instead of displaying the price on the screen, add a field to your form for an email address and send the quote via email instead. Your email message can include custom content highlighting seasonal offers that are related to their query, coupon codes for their friends, or messages about upcoming events. Use the MailChimp and Form Action Automation add-ons to further enhance your email marketing.
- Take deposits and bookings. Using the Paypal or Stripe add-ons, it is very easy to turn a quotation into a transaction. You can allow clients to pay the full amount upfront, or if a smaller deposit is more appropriate to your business, it is easy to set up a percentage deposit based on the calculated total.
- Make a sale! The WooCommerce Add-On makes it childs play to use the value calculated as the price of your product. This means that customized products, and even subscriptions are a breeze. Your customers can choose their options and sign up instantly.
Formidable’s calculated fields are indispensable. But as we’ve seen here, Lookup Fields can be used to build solutions when calculated fields would require too much finagling. What kinds of quotation forms are you itching to build with Formidable’s Lookup Fields? Visit the Lookup Field documentation for more step by step instructions to help you get started.