Cost Calculator Builder
Item PageVideo TutorialsChangelogResources Get Started
  • Cost Calculator Builder Documentation
  • Getting Started
    • Free Version and Pro Version
    • System Requirements
    • Plugin Installation
    • License Activation
      • Upgrading the License
    • Update Billing Details and Access Invoices
    • License Utilization
    • Update The Plugin
    • Templates
    • Feature Request
  • Plugin Features
    • How to Create a Calculator
    • How to Manage Calculators
    • How to Add a Calculator to the Page
    • Calculator Appearance
    • Additional Classes
  • Cost Calculator Settings
    • Calculator Settings
      • Summary Block
      • Currency
      • Warning Texts
      • Confirmation Page
      • Order Form
      • Form Manager
      • Sticky Calculator
      • Woo Products
      • Woo Checkout
      • Payments
      • Webhooks
    • Global Settings
      • Currency (Global)
      • PDF Entries
      • Share Quote Form
      • Order Form (Global)
      • Email Template
      • Backup Settings
      • AI Formula
      • Captcha
      • Payments (Global)
      • Geolocation
  • Calculator Elements
    • General Overview
    • Text
    • Quantity
    • Validated form
    • Dropdown list
    • Image Dropdown (Pro feature)
    • Radio Select
    • Image Radio (Pro feature)
    • Switch Toggle
    • Checkbox
    • Image Checkbox (Pro feature)
    • Date Picker (Pro feature)
    • Time Picker (Pro feature)
    • Basic Slider
    • Multi Range (Pro feature)
    • File Upload (Pro feature)
      • How to Allow Additional File Types in WordPress
      • How to Increase Maximum File Upload Size in WordPress
    • HTML
    • Geolocation (Pro feature)
    • Line
    • Formula
      • AI Assistant (Pro feature)
    • Repeater (Pro feature)
    • Group Field (Pro feature)
    • Page Breaker (Pro feature)
  • Conditional System
    • Introduction
    • How to Create a Condition
    • Condition Options
    • Condition Actions
    • AND/OR Conditions
    • Condition Creating Example
  • Special Plugin Features
    • Orders
    • Discounts
    • Required Fields
    • Contact Form 7 Plugin
  • Payments
    • Settings
    • PayPal
    • Stripe
    • Razorpay
    • Cash Payment
  • Translating Cost Calculator Into a Different Language
    • Translation Basics
    • Translating Static Strings
    • Translating Calculator with WPML
    • FAQ
  • Develeoper's guide
    • Cost Calculator Hooks
      • Order Management
      • Contact Form
      • Confirmation Page
      • Email
  • Troubleshooting
    • Introduction
    • Plugin Conflicts
    • Theme Compatibility
    • Calculator is not loading
    • Cache Settings
    • Email not sending
    • Debug Logs
    • Submit a Support Ticket
  • Changelog
    • Release Notes
    • Changelog (Free Version)
    • Changelog (Pro Version)
  • Pre-built Calculators & Cases
    • Service Booking
    • Graphic Design
    • Loan Interest
    • Delivery Service
    • Renovation Company
    • Dental Services
    • Car Wash Company
    • Medical Services
    • Tuition Fees
    • Printing Services
    • Car Rental
    • Venue Rental Service
  • Advanced Topics
    • License Management
  • Stylemixthemes
    • Cost Calculator Builder WordPress Plugin
    • Themes
    • Plugins
Powered by GitBook
On this page
  • Formula field contains non-existing element.
  • Incorrect usage of the if/else statements in Formula field

Was this helpful?

  1. Troubleshooting

Calculator is not loading

The preloader icon is spinning and the calculator is not loading on the page.

PreviousTheme CompatibilityNextCache Settings

Last updated 2 years ago

Was this helpful?

Are you experiencing users being unable to see the calculator on the page?

This is a very common issue that is most likely related to the following reasons:

  • Formula field contains non-existing element.

  • Formula field contains not logical calculations.

  • Incorrect usage of the if/else statements in Formula field.

Formula field contains non-existing element.

In our example calculator is searching for quantity_field_id_10, but it does not exist. To make sure let's check your Formula field and used elements:

Incorrect usage of the if/else statements in Formula field

While adding a conditional statement in the format of JavaScript code make sure that you followed JavaScript Standard and validated before directly pasting it to the Formula filed. When if/else statements are not finished the Calculator may stop loading on the Page. Here is an example:

```javascript
if (radio_field_id_2 == 30) {
    if (dropDown_field_id_1 == 1) {
        50 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        100 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        150 + radio_field_id_2 +  toggle_field_id_8 
    } else {
        180 + radio_field_id_2 +  toggle_field_id_8 
    }
} else {
    if (dropDown_field_id_1 == 1) {
        10 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        20 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        30 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 >= 3){
        40 +  toggle_field_id_8 
    }
}
```

The if/else statement is wrong in this example because it is ending with "else if" in the else part of the snippet.

```javascript
if (radio_field_id_2 == 30) {
    if (dropDown_field_id_1 == 1) {
        50 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        100 + radio_field_id_2 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        150 + radio_field_id_2 +  toggle_field_id_8 
    } else {
        180 + radio_field_id_2 +  toggle_field_id_8 
    }
} else {
    if (dropDown_field_id_1 == 1) {
        10 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 2) {
        20 +  toggle_field_id_8 
    } else if (dropDown_field_id_1 == 3) {
        30 +  toggle_field_id_8 
    } else {
        40 +  toggle_field_id_8 
    }
}
```

The if/else statement is correct in this example because it is ending with "else" in all parts of the snippet.

the Formula field which is used on your calculator. The fastest way to rule this issue out is to check the console using .

While checking the formula field you can see there is an incorrect element used. After removing or adding new elements into pre-built calculators, use correct calculations in the .

Browser developer tools
Formula field