Title: conditional
Last modified: April 22, 2025

---

# conditional

 *  Resolved [PB](https://wordpress.org/support/users/ohtusabes/)
 * (@ohtusabes)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/)
 * Hi [@codepeople2](https://wordpress.org/support/users/codepeople2/)
 * I would like to display different text strings in fieldname43 based on the value
   of fieldname12. However, it only responds correctly when the value is 0—other
   values do not trigger the expected output. Could you please help me find a solution?
 * Thanks in advance
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-10%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/#post-18429952)
 * Hello [@ohtusabes](https://wordpress.org/support/users/ohtusabes/)
 * Could you please share the equation’s code to check the issue?
 * Best regards.
 *  Thread Starter [PB](https://wordpress.org/support/users/ohtusabes/)
 * (@ohtusabes)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/#post-18430007)
 * Hi [@codepeople2](https://wordpress.org/support/users/codepeople2/)
 * The code is as follows:
 *     ```wp-block-code
       (function(){  var x = Number(fieldname12);  if (x === 0) return 'Controlar cada 2 horas';  if (x >= 1 && x <= 4) return 'Controlar cada 4 horas';  if (x >= 5) return 'Controlar cada 6 horas';  return '';})()
       ```
   
 * Thank you.
 *  Plugin Author [CodePeople2](https://wordpress.org/support/users/codepeople2/)
 * (@codepeople2)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/#post-18430046)
 * Hello [@ohtusabes](https://wordpress.org/support/users/ohtusabes/)
 * Your equation is correct and functions perfectly. However, note that fieldname43
   was configured to depend on the value of fieldname12. Specifically, in fieldname12,
   you set a dependency to activate fieldname43 only when fieldname12 equals zero.
   Then, in the equation for fieldname43, you reference fieldname12, creating a 
   cross-reference that invalidates your equation.
 * Please remove the dependency from the fieldname12 field’s configuration to resolve
   this issue.
 * Best regards.
 *  Thread Starter [PB](https://wordpress.org/support/users/ohtusabes/)
 * (@ohtusabes)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/#post-18430209)
 * Hi [@codepeople2](https://wordpress.org/support/users/codepeople2/)
 * You’re right. I tested a dependency while exploring the options and inadvertently
   left this one in.
 * Thank you very much!

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

The topic ‘conditional’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [PB](https://wordpress.org/support/users/ohtusabes/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/conditional-10/#post-18430209)
 * Status: resolved