Title: Quick question about loading checkboxes
Last modified: August 22, 2016

---

# Quick question about loading checkboxes

 *  Resolved [Daniel](https://wordpress.org/support/users/dmzayasplus/)
 * (@dmzayasplus)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/quick-question-about-loading-checkboxes/)
 * So I am able to load checkboxes and dropdowns after loading repeaters simply 
   by using:
 * `<?php if($key_1 == 'option_1') : ?>`
 * But simply assigning a container to a post type, I somehow have lost the ability
   to do that. Am I doing it wrong? 😀
 * Just trying to create an if/then statement using whether or not a checkbox is
   checked.
 * Thanks!
 * [https://wordpress.org/plugins/ultimate-fields/](https://wordpress.org/plugins/ultimate-fields/)

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

 *  Thread Starter [Daniel](https://wordpress.org/support/users/dmzayasplus/)
 * (@dmzayasplus)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/quick-question-about-loading-checkboxes/#post-5505902)
 * Oh and in checkboxes in repeaters I can do:
 * `<?php if( $blueberries == 'blueberries' ) : ?>`
 * So it doesn’t make sense that I can’t so it using a custom post type…
 *  Thread Starter [Daniel](https://wordpress.org/support/users/dmzayasplus/)
 * (@dmzayasplus)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/quick-question-about-loading-checkboxes/#post-5506055)
 * Figured it out for anyone with the same problem.
 *     ```
       <?php
           $yesks = get_uf('accepts_kickstarter');
           if ( 1 == $yesks ) {
       ?>
       ```
   
 * 1 in this case is the checkbox being selected. When you try to call it without
   a variable ($yesks in this case) it gives you the array instead of the value,
   so is mostly useless when you want to know if a button is checked.

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

The topic ‘Quick question about loading checkboxes’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-fields/assets/icon-256x256.png?rev=1856787)
 * [Ultimate Fields](https://wordpress.org/plugins/ultimate-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-fields/reviews/)

## Tags

 * [if/then](https://wordpress.org/support/topic-tag/ifthen/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 1 participant
 * Last reply from: [Daniel](https://wordpress.org/support/users/dmzayasplus/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/quick-question-about-loading-checkboxes/#post-5506055)
 * Status: resolved