Title: Conditional Fields
Last modified: May 28, 2022

---

# Conditional Fields

 *  [remcorhee](https://wordpress.org/support/users/remcorhee/)
 * (@remcorhee)
 * [4 years ago](https://wordpress.org/support/topic/conditional-fields-51/)
 * Hi!
 * I have 20 fields ACF,but conditionally. So if field 1 has content, field 2 is
   shown. So it is possible not al fields are filled.
 * The calculation is sum(field_1+field_2+ etc.) for 20 fields. But when someone
   not uses all fields, the sum = 0. Even when some fields do have value.
 * Is there a way to tell the calculation to only calculate fields when in order/
   filled. When conditionally not used, it will not be in the calculation (or as
   0).
 * Hope you understand what I try to explain. Thanks and best regards,
 * Remco
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-fields-51%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [nick6352683](https://wordpress.org/support/users/nick6352683/)
 * (@nick6352683)
 * [4 years ago](https://wordpress.org/support/topic/conditional-fields-51/#post-15688813)
 * I did not test this, so I could be wrong, but:
 * – My understanding is that if a field is not shown due to a condition set in 
   ACF, that field will simply not show up, thus your calculation will include a
   field or fields in this case that “technically” does/do not exist. The proof 
   of that according to you, is that if all 20 fields are included because they 
   all met the set conditions, all is well.
 * I cannot think of a quick for that, as this is the way ACF handles conditions.
 * – My suggestion is to use a Repeater field if possible, although not knowing 
   exactly what you are building, it may or it may not be suitable for your needs.
 * – Another suggestion would be to forget the conditions, and set default values(
   like 0) to all the 20 fields, and set them as mandatory fields too, for a foolproof
   solution. Reading again your question, I think this is what you possibly need.
 * I might help you more if you provide a more detailed description what you are
   trying to build.
 * Nick.

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/calculated-fields-for-acf/assets/icon-256x256.png?rev=2206639)
 * [Calculated fields for ACF](https://wordpress.org/plugins/calculated-fields-for-acf/)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-for-acf/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-for-acf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-for-acf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-for-acf/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [nick6352683](https://wordpress.org/support/users/nick6352683/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/conditional-fields-51/#post-15688813)
 * Status: not resolved