Title: Checkboxes value for multiple choices
Last modified: November 17, 2023

---

# Checkboxes value for multiple choices

 *  Resolved [invisiblesy](https://wordpress.org/support/users/invisiblesy/)
 * (@invisiblesy)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/checkboxes-value-for-multiple-choices/)
 * Hi again. It seemed like a dumb question, but I can’t figure it out.
 * Let’s say, I have a checkboxes field (fieldname123) with “1”,”2″ and “3” options.
   I need to create a condition that works if the user selects “1”. If I write IF(
   fieldname123==1,…) it works if the user selects option “1” only. But it doesn’t
   work if he selects, for example, both “1” and “2”. What condition should I write
   to make the function work if the user selects a certain option, no matter if 
   he selects other ones or not?
 * Thanks in advance.

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

 *  Thread Starter [invisiblesy](https://wordpress.org/support/users/invisiblesy/)
 * (@invisiblesy)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/checkboxes-value-for-multiple-choices/#post-17210068)
 * Alright, I resolved it by myself by creating condition IF(MIN(fieldname123<2),…,…)
   and it works for me.
    -  This reply was modified 2 years, 6 months ago by [invisiblesy](https://wordpress.org/support/users/invisiblesy/).
    -  This reply was modified 2 years, 6 months ago by [invisiblesy](https://wordpress.org/support/users/invisiblesy/).
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/checkboxes-value-for-multiple-choices/#post-17210125)
 * Hello [@invisiblesy](https://wordpress.org/support/users/invisiblesy/)
 * Actually, there is a better solution. Using the field’s name with the |r modifier(
   for raw mode) in the equations allows you to access an array with values of ticked
   choices.
 * Then you can implement equations as follows:
 *     ```wp-block-code
       IF(IN(1, fieldname123|r), 'The choice A is selected', IF(IN(2, fieldname123|r), 'The choice B is selected', ''))
       ```
   
 * Best regards.

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

The topic ‘Checkboxes value for multiple choices’ 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

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

 * 2 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/checkboxes-value-for-multiple-choices/#post-17210125)
 * Status: resolved