4 Ways You Can Make Your Reps More Productive Today – Download Now

Building a calculator with WP Forms plugin

Building a calculator with WP Forms plugin

One of the great things about WordPress is the great number of amazing plugins that are available to extend/build functionality in any type of website. One such amazing plugin is the WP Forms plugin which is a great plugin to create amazing forms quickly. However, what I really like about this particular plugin is how it provides amazing options to extend its features with the right use of actions and filters.

So when needing to build a customized calculator WP Forms seemed like a great choice. So here is how we built a custom calculator for a client using WP Forms.

Step 1:
Create your form

This is a no-brainer considering how easy it is to create a form using WP Forms. Make sure that whatever fields you want to use for calculation are numbers – this way the validation check are done for you already.

Step 2:
Note the numbers for the fields on which you want to perform calculation.
WPForms Builder - Field Numbers

Step 3:
Find out the id for the form.
WPForms Builder - Form ID

Step 4:
Add this bit of code in your site (usually the functions.php file)

Advantages of this approach

  • You can use the validation methods that already come built inside WP Forms
  • Entries are stored at the backend for later reference (you can even export these as a csv)
  • Email is sent with the form data – it can be customized to show the form calculation result as well (not covered in this example)
  • Using the Pro version of the plugin you can actually build a multi page/part calculator where data is gathered over multiple steps and then processed at the end

Click Here For Demo

* Note that the version we used is the pro version which has some features available that are unavailable in the free version (such as multi-page conditional forms) – but effectively the idea is the same. You can build multi-step conditional forms that perform complex calculations using this method.

WordPress upgrade blues … when you need help from an expert

WordPress is the most popular CMS in the world right now. It is popular not just because it is free but because it is far easier to manage as compared to other solutions out there. Ask anyone who has spent time updating Drupal/Joomla sites and the ease in managing a basic WordPress setup is obvious. Most of the time creating a backup of the database and the wp-content folder (or all WordPress files if that is easier for you) is all you need to do before hitting an upgrade from the WordPress Dashboard. But there are times when an upgrade becomes a painful problem and it is best to have an expert handle it.

Listed below are some likely scenarios when you may want to have an expert sort it out for you.

You are unable to perform the upgrade by just clicking the upgrade button

Possible Cause#1: File permissions
This usually happens when due to server file permissions the upgrade cannot be performed. In this case you are presented with a screen which asks for FTP/SFTP info which WordPress can then use to move the files.

Possible Cause#2: Php version too old
Every iteration of the software aims to improve on the previous by using newer technologies/tools available. As WordPress runs on Php so it requires a later version of Php every now and then. If your server has not adjusted the Php environment for your setup then you may face upgrade issues.

Yikes my site looks nothing like it used to before the upgrade!

Possible Cause#1: Theme upgrade
What likely happened here is that you upgraded a theme without ever having created a child theme. All customization done to the parent will get overwritten as soon as you upgrade the theme.

Possible Cause#2:  Plugin upgrade
You may have been using some sort of page builder tool or a plugin that was rendering a portion of the site. An upgrade may have caused either the plugin to stop working or the plugin author may have changed the styling/markup which can cause the look of your site to be different.

You get a plain white screen (also known as white screen of death)

Possible Cause#1:  Fatal error in code
Due to a combination of the theme/plugin upgrade you may now be encountering an error that is stopping the php script from continuing. To find out more try to get hold of the server error log. In most cPanel based hosting solutions you can find  the file called error_log which may contain more info.

Possible Cause#2:  Server memory issue
Your WordPress installation may need more memory that previously. This may be due to a theme/plugin upgrade which may now be needing more memory than before and hence causing the breakdown.

All the images your uploaded in your content have disappeared!

Possible Cause#1:  Responsive media served by WordPress since 4.4
This is usually only an issue if you have SSL enabled on your site but the images on your site are not being served via https. This can cause all images which are served using the srcset attribute to generate insecure data errors in your browser console and not show up on your site after an upgrade.

The issues listed above are not an exhaustive list as WordPress is widely used over many configurations. If you are ever faced with such issues then it might be a better idea to find an expert to help you. Always remember to take a backup of the site before you update it. Without a backup at times even an expert may not be able to solve your issues for you!