Title: multiple conditions
Last modified: October 22, 2023

---

# multiple conditions

 *  Resolved [elmirasln](https://wordpress.org/support/users/elmirasln/)
 * (@elmirasln)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/multiple-conditions-15/)
 * Hi,
 * I’m building a form in cff and here is the situation:
 * There are 4 numeric fields and the user is free to choose any of them to fill.
   But if the user fills all of them, an extra cost will be added (which is calculated
   in fieldname5). So there are 4 conditional statements. If their values are greater
   than zero, then return the value of fieldname5, otherwise return 0.
 * This is what i’ve written in cff equation but doesn’t work:
 * if(and(0<fieldname1,0<fieldname2,0<fieldname3,0<fieldname4),fieldname5,0)
 * Seems like my conditional statement is wrong but I don’t know how to fix it.

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/multiple-conditions-15/#post-17142202)
 * Hello [@elmirasln](https://wordpress.org/support/users/elmirasln/),
 * Thank you very much for using our plugin.
 * Javascript, the language supported by browsers, is case-sensitive. Please edit
   the equation as follows:
 *     ```wp-block-code
       IF(AND(0<fieldname1,0<fieldname2,0<fieldname3,0<fieldname4),fieldname5,0)
       ```
   
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘multiple conditions’ 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

 * [multiple conditions](https://wordpress.org/support/topic-tag/multiple-conditions/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/multiple-conditions-15/#post-17142202)
 * Status: resolved