Title: Conditional Values
Last modified: December 11, 2018

---

# Conditional Values

 *  Resolved [lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/)
 * (@lukegoldthorpe)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/)
 * Hey,
 * I recently posted about a salary calculator and you got back very quickly, therefore
   question number two is on its way!
 * Is there any possible way of adding more conditional values to the calculated
   output area. I want to set it up so depending on what number is calculated, a
   different output field shows up. However I can only add 1 and I want to add 3:
   For example,
 * If 0 = “Average”
    If > 0 = “Above Avg” If < 0 = “Below Avg”
 * Any feedback is grateful as always!

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10972636)
 * Hello [@lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/),
 * Assuming current equation is: fieldname1+fieldname2, it should be edited as follows:
 *     ```
       (function(){
       var v = fieldname1+fieldname2;
       if(v==0) return 'Average';
       if(v<0) return 'Below Average';
       return 'Above Average';
       })()
       ```
   
 * And that’s all.
    Pay attention to the use of conditional statements (if) in the
   equation. Best regards.
 *  Thread Starter [lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/)
 * (@lukegoldthorpe)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10972828)
 * Thanks for this again,
 * What I was meaning was not part of the equation it was a below option which states‘
   If value is:….’ Then has a drop down for equal to, greater than etc.
 * However, your answer has made me re-jig the form by doing it through the equation
   code and has made the functionality so much better. Thanks for your help!
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10972923)
 * Hello [@lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/),
 * You are talking about the dependencies. Through this section you can define dependencies
   between fields.
 * For example, assuming there are two fields in the form (fieldname123 and fieldame567)
   that you want to display and mark as active when the result of the equation associated
   to the calculated field is zero. In this case you should define the rule: if 
   the value is equal to 0, then select the field: fieldname123 through the drop
   down list, press the plus icon beside the drop down list, and select the fieldname567
   through the new drop down list.
 * The plus icon beside the validation rule allow you define more validation rules
   associated to the same result, for example if the equation’s result is greater
   than zero, etc.
 * Best regards.
 *  Thread Starter [lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/)
 * (@lukegoldthorpe)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10973496)
 * Ah! Wow! This would make sense but I have not been able to do this because the‘
   +’ and ‘x’ symbols have bugged and are invisible. On standard fields, I assumed
   where they would be and hovered until they showed up. Hard to explain, have screenshots
   to back up my point. But thanks again.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10973526)
 * Hello [@lukegoldthorpe](https://wordpress.org/support/users/lukegoldthorpe/),
 * I guess the issue its caused by a conflict with the styles in the theme active
   on your website.
 * Could you create a ticket in my private website for checking in detail the styles
   on your website, please?
 * [https://cff.dwbooster.com/contact-us](https://cff.dwbooster.com/contact-us)
 * Best regards.

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

The topic ‘Conditional Values’ 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

 * [comparison](https://wordpress.org/support/topic-tag/comparison/)
 * [values](https://wordpress.org/support/topic-tag/values/)

 * 5 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/conditional-values/#post-10973526)
 * Status: resolved