Title: Conditional Solutions
Last modified: July 19, 2021

---

# Conditional Solutions

 *  Resolved [sagarchataut](https://wordpress.org/support/users/sagarchataut/)
 * (@sagarchataut)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/conditional-solutions/)
 * I need a help, I’m trying to get a solution for this;
    Suppose I have obtained
   a result <1 for a calculation, then I have to proceed my 4-5 steps of calculations
   and display that result only. And similarly, if I got value ≥1, then again I’ve
   to use different formulas and different steps to show the result obtained in 
   this case only. So, is it possible to show one set of calculations and result
   only. Case is: If M<P, then it will have different steps to be performed, other
   than when having P>M. And only the true case solutions has to be displayed.

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/conditional-solutions/#post-14677445)
 * Hello [@sagarchataut](https://wordpress.org/support/users/sagarchataut/)
 * To display some fields in the form based on the equation’s results, you can define
   dependencies between these fields and the equations from the settings of the 
   calculated field. More information about dependencies by reading the following
   blog post:
 * [https://cff.dwbooster.com/blog/2020/03/01/dependencies](https://cff.dwbooster.com/blog/2020/03/01/dependencies)
 * But if you want to evaluate some operations based on fields’ values, you should
   use conditional statements or conditional operations in the equation. For example,
   assuming you have the sum `fieldname1+fieldname2`, and you want to increase the
   result by 10% if the sum is greater than 10, or 20% percent if not. The equation
   can be implemented as follows:
 *     ```
       (function(){
       var result = fieldname1+fieldname2;
   
       if(result <= 10) result = result*1.20;
       else result = result*1.10;
   
       return result;
       })()
       ```
   
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Conditional Solutions’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](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/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [result](https://wordpress.org/support/topic-tag/result/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/conditional-solutions/#post-14677445)
 * Status: resolved