Title: hide calculation
Last modified: September 26, 2018

---

# hide calculation

 *  Resolved [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/)
 * Please take a look at [http://loeka.optiion.nl/canvas/](http://loeka.optiion.nl/canvas/)
 * When you first select “Canvas” you see 2 number fields both with a max setting(
   one max 110 and the other max 300).
 * Now when you enter a values in these fields that are above the max, a warning
   text is displayed which is fine!
 * But in the calculed field below called “Prijs Canvas” there is still the total
   price displayed. I would like to display nothing in this field when the values
   in the number fields are above the max. (Or display a warning text)
 * How can I do that?
 * Thank you very much.
 * Regards,
    Alwin

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/#post-10724353)
 * Hello [@wp-opti](https://wordpress.org/support/users/wp-opti/),
 * The validation rules are checked when the form is submitted, and not when the
   equiations are evaluated. So, if you want to evaluate the equation:
 *     ```
       CEIL(fieldname2*fieldname3/100)
       ```
   
 * only if fieldname2 is less than or equal to 110 and fieldname3 is less than or
   equal to 300, the equation should be edited as follows:
 *     ```
       IF(AND(fieldname2<=110, fieldname3<=300),CEIL(fieldname2*fieldname3/100), '')
       ```
   
 * and that’s all.
    Best regards.
 *  Thread Starter [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/#post-10724720)
 * That worked great; thank you!
 * I have one more form with the same issue. I can not simply copy-paste your code
   in that form because the code of the calculated field is already edited like 
   this:
 * (function(){
    var value = fieldname2*fieldname6/100; if(5 < value) return CEIL(
   value); else return CEIL(value,0.5); })()
 * So how can I change this code to do the same trick as with the previous issue?
 * Thank you!
 * Regards,
    Alwin
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/#post-10724832)
 * Hello [@wp-opti](https://wordpress.org/support/users/wp-opti/),
 * In this case you simply should use the conditional statement “if” of javascript,
   instead the “IF” operation in the plugin. For example,
 *     ```
       (function(){
           if(AND(fieldname2<=110, fieldname6<=300))
           {
               var value = fieldname2*fieldname6/100;
               if(5 < value) return CEIL(value);
               else return CEIL(value,0.5);
           }
           return '';
       })()
       ```
   
 * Of course in this case, instead to the values 110 and 300 you should use the 
   values corresponding to this form.
 * Best regards.
 *  Thread Starter [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/#post-10724908)
 * And that worked again!
 * I hope my rather complex forms (for me) are ready now!
 * Thank you very much for all your great support so far! I will sure write a great
   review!!
 * Regards,
    Alwin

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘hide calculation’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Alwin](https://wordpress.org/support/users/wp-opti/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/hide-calculation/#post-10724908)
 * Status: resolved