Support

Account

Home Forums Search Search Results for 'event date repeater'

Search Results for 'event date repeater'

reply

  • Hi,

    I am not quite sure if this is the right topic but before opening a new thread I’d like to try it here first as it is somehow the same issue. Pls let me know if this would be worth a new topic…

    My problem:
    I use AFC very effective and pleased in the whole project. Since I created a new flip card group component I have the issue that editing the specific page creates an overload on RAM and CPU on my server. Viewing the page and clicking around in the admin console is fine. Only when I start editing and especially when I try to save my changes, the server looses connection to the database…

    here is my layout:

    <?php
    
    namespace Flynt\Components\BnbCmsFlipCardGroup;
    
    function getACFLayout()
    {
        return [
            'name' => 'BnbCmsFlipCardGroup',
            'label' => 'BNB CMS Flip Card Group',
            'sub_fields' => [
                [
                    'label' => __('Allgemeines', 'flynt'),
                    'name' => 'general',
                    'type' => 'tab',
                ],
                [
                    'label' => __('Jumpmark', 'flynt'),
                    'name' => 'jumpmark',
                    'type' => 'text',
                    'instructions' => 'ACHTUNG: Jumpmarks MÜSSEN pro Seite einzigartig sein und dürfen KEINE Leerzeichen, Sonderzeichen oder Umlaute enthalten.<br>Doppelte Jumpmarks verringern die SEO Qualität und nur die erste Jumpmark wird angesprungen.',
                ],
                [
                    'label' => 'Farbe (Hintergrund-Rahmen)',
                    'name' => 'color',
                    'type' => 'select',
                    'choices' => [
                        'black-black' => 'Standard Schwarz',
                        'yellow-red' => 'Gelb-Rot',
                        'red-yellow' => 'Rot-Gelb',
                        'green-red' => 'Grün-Rot',
                        'red-green' => 'Rot-Grün',
                        'yellow-purple' => 'Gelb-Lila',
                        'purple-yellow' => 'Lila-Gelb',
                        'green-purple' => 'Grün-Lila',
                        'purple-green' => 'Lila-Grün',
                    ],
                ],
                [
                    'label' => __('Headline', 'flynt'),
                    'name' => 'headline',
                    'type' => 'text',
                ],
                [
                    'label' => __('Text', 'flynt'),
                    'name' => 'text',
                    'type' => 'wysiwyg',
                    'media_upload' => 0,
                    'delay' => 1,
                ],
                [
                    'label' => __('Globaler Prefix Text Vorderseite', 'flynt'),
                    'name' => 'prefix',
                    'type' => 'text',
                ],
                [
                    'label' => __('Flip Card Elemente', 'flynt'),
                    'name' => 'flip_card_items',
                    'type' => 'tab',
                ],
                [
                    'label' => __('Flip Cards', 'flynt'),
                    'name' => 'flip_cards',
                    'type' => 'repeater',
                    'collapsed' => 'field_pageComponents_pageComponents_BnbCmsFlipCardGroup_flip_cards_text_front',
                    'layout' => 'row',
                    'min' => 1,
                    'button_label' => 'Hinzufügen',
                    'sub_fields' => [
                        [
                            'label' => __('Text', 'flynt'),
                            'name' => 'text_settings',
                            'type' => 'tab',
                        ],
                        [
                            'label' => __('Text Vorderseite', 'flynt'),
                            'name' => 'text_front',
                            'type' => 'text',
                        ],
                        [
                            'label' => __('Text Rückseite', 'flynt'),
                            'name' => 'text_back',
                            'type' => 'wysiwyg',
                            'media_upload' => 0,
                            'delay' => 1,
                        ],
                        [
                            'label' => __('Bild', 'flynt'),
                            'name' => 'image_setting',
                            'type' => 'tab',
                        ],
                        [
                            'label' => 'Image',
                            'name' => 'image',
                            'type' => 'image',
                            'return_format' => 'id',
                            'preview_size' => 'medium',
                        ],
                        [
                            'label' => 'Bildrechte',
                            'name' => 'image_copyright',
                            'type' => 'text',
                            'instructions' => 'Überschreibt die Daten aus dem Feld "Beschreibung" der Mediathek.<br>NOTIZ: KEINE Zeilenumbrüche. Anführungszeichen müssen einen vorhergehenden Backslash haben (z.B. \"Lorem Ipsum\").',
                        ],
                        [
                            'label' => 'Bild Alt-Text',
                            'name' => 'image_alt',
                            'instructions' => 'Überschreibt die Daten aus dem Feld "Alternativer Text" der Mediathek. Wird nur gesetzt, sollte keine Bildunterschrift gesetzt werden!<br>NOTIZ: KEINE Zeilenumbrüche. Anführungszeichen müssen einen vorhergehenden Backslash haben (z.B. \"Lorem Ipsum\").',
                            'type' => 'text',
                        ],
                        [
                            'label' => 'Bild Helligkeit',
                            'name' => 'image_mode',
                            'type' => 'radio',
                            'choices' => [
                                'false' => 'Dark copyright',
                                'true' => 'Bright copyright',
                            ],
                        ],
                        [
                            'label' => 'Bild Abdeckung',
                            'name' => 'image_coverage',
                            'type' => 'radio',
                            'instructions' => '
                            Cover: Der ersetzte Inhalt wird in der Größe angepasst, sodass das Seitenverhältnis beibehalten wird während die gesamte Inhaltsbox des Elements ausgefüllt wird: die konkrete Objektgröße wird als eine Abdeckbeschränkung auf die verwendete Breite und Höhe des Elements bestimmt.
                            <br>
                            <br>
                            Contain: Der ersetzte Inhalt wird in der Größe angepasst, sodass das Seitenverhältnis beibehalten wird während es an die Inhaltsbox des Elements angepasst wird: die konkrete Objektgröße wird als eine Inhaltsbeschränkung auf die verwendete Breite und Höhe des Elements bestimmt.
                        ',
                            'choices' => [
                                'cover' => 'Cover',
                                'contain' => 'Contain Whole Image',
                            ],
                        ],
                        [
                            'label' => 'Bild Position',
                            'name' => 'image_position',
                            'type' => 'group',
                            'sub_fields' => [
                                [
                                    'label' => 'Bild Position Wert #1',
                                    'name' => 'image_position_value1',
                                    'type' => 'radio',
                                    'choices' => [
                                        'top' => 'top',
                                        'bottom' => 'bottom',
                                        'left' => 'left',
                                        'right' => 'Right',
                                        'center' => 'Center',
                                    ],
                                    'layout' => 'horizontal',
                                ],
                                [
                                    'label' => 'Bild Position Wert #2',
                                    'name' => 'image_position_value2',
                                    'type' => 'radio',
                                    'choices' => [
                                        'top' => 'top',
                                        'bottom' => 'bottom',
                                        'left' => 'left',
                                        'right' => 'Right',
                                        'center' => 'Center',
                                    ],
                                    'layout' => 'horizontal',
                                ],
                                [
                                    'label' => 'Prozentwerte',
                                    'name' => 'percentage',
                                    'type' => 'text',
                                    'instructions' => '
                                Insert 1-2 values as
                                <br>
                                A) Prozentwerte <b>z.B. 50% 20%</b> für die horizontale und vertikale Achse
                                <br>
                                <b>OR</b>
                                <br>
                                B) Pixel <b>z.B. 100px 20px</b> für eine pixelgenaue Position
                                ',
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ];
    }

    As a hotfix we where able to solve it by increasing the RAM and CPU on the server but I am afraid that this will pop up again as we did not even have the full content on our staging system so far.

    Any ideas why? As we will have to go live with the feature pretty soon, I am a bit concerned I missed something in the structure to prevent this issue…

    thx in advance.

  • I cannot think of any easy way to do this.

    I would create the CPT and then I would create a function that did this that I would remove when the process is complete.

    I would also set the options page auto_load argument to true and save the options page, this alone might speed up the loading of the options page. But you need ti to auto load for the conversion.

    Next thing is that I would create a new text field in the repeater called “tranfered_to_post” or something like that, name does not really matter. Again, save the options page to and this will make sure the new sub field exists in all of the rows.

    
    add_action('init', 'move_repeater_to_cpt');
    function move_repeater_to_cpt() {
      // set some reasonable limit on the number of posts to create
      // to prevent timeout
      $limit = 20;
      // count of posts created
      $count = 0;
      if (have_rows('repeater', 'options')) {
        while(have_rows('repeater', 'options')) {
          the_row();
          if (!empty(get_sub_field('tranfered_to_post')) {
            // this row already done, move to the next one
            continue;
          }
          // *********************************************
          // create a new post base on row data
          // *********************************************
         
          // mark the row as done
          update_sub_field('tranfered_to_post, 'done');
        } // end while have_rows
      } // end if have_rows
    } // end function
    

    then you just need to keep reloading any page on the site until all of the rows are converted. Then delete the function.

  • Thanks for this suggestion @hube2 – this is a nice piece of functionality.

    I made some tweaks for my use case, pasted here in case useful to anyone. In my case, I want to be able to check that the first field of each the repeater is unique – I don’t care what happens to the others. This way the field becomes a key.

    NB this doesn’t currently work for nested repeaters-in-repeaters. One day I may try to tackle that.

    The main function is here:

    add_filter('acf/validate_value/type=repeater', 'grly_acf_validate_repeater', 10, 4);
    
    function grly_acf_validate_repeater($valid, $value, $field, $input) {
    
    	if (!$valid || !$field['preventduplicates']) {
    		return $valid;
    	}
    
    	// get list of array indexes from $input
    	// [ <= this fixes my IDE, it has problems with unmatched brackets
    	preg_match_all('/\[([^\]]+)\]/', $input, $matches);
    	if (!count($matches[1])) {
    		// this should actually never happen
    		return $valid;
    	}
    	$matches = $matches[1];
    
    	// walk the acf input to find the repeater and current row
    	$array = $_POST['acf'];
    
    	$field_key = false;
    	$field_value = false;
    
    	for ($i = 0; $i < count($matches); $i++) {
    		if (isset($array[$matches[$i]])) {
    
    			$field_key = $matches[$i];
    			$field_value = $array[$matches[$i]];
    
    			if ($field_key == $field['key']) {
    				break;
    			}
    			$array = $field_value;
    
    		}
    	}
    
    	$used = [];
    	foreach ($field_value as $index => $row) {
    		$first_entry = reset($row); // Extracts the first entry in the object for that row;
    		if ($first_entry) {
    			if (!in_array($first_entry, $used)) {
    				$used[] = $first_entry;
    			} else {
    				$valid = 'The value ' . $first_entry . ' is used more than once. The first field in this repeater must be unique across the repeater.';
    				break;
    			}
    		}
    	}
    
    	return $valid;
    }
    

    … then I’ve added a ‘prevent duplicates’ field to all repeaters so that it can be toggled on and off:

    add_action('acf/render_field_settings/type=repeater', 'add_no_duplicates_field_to_repeater');
    function add_no_duplicates_field_to_repeater($field) {
    	acf_render_field_setting($field, [
    		'label' => __('Prevent duplicates?', 'acf'),
    		'instructions' => 'Prevents rows being saved where the first value is the same as that in another row',
    		'type' => 'radio',
    		'name' => 'preventduplicates',
    		'choices' => array(
    			1 => __("Yes", 'acf'),
    			0 => __("No", 'acf'),
    		),
    		'default_value' => 0,
    		'layout' => 'horizontal',
    	]);
    
    }
  • I would add another field to my repeater, probably a true/false field to set display on/off. I would probably add some type of acf/validate_value filter to make sure that at least one row of the repeater is set to be shown because with them all set to not show the code I include would cause an infinite loop, but I would also build some kind of exit into the loop to prevent this as well.

    
    $slide = array_rand($component_fields['slides']);
    $slide = $component_fields['slides'][$slide];
    $count = 0;
    // use count to make sure we only to this X number of times to prevent infinite loop
    // and test display true/false field
    while ($count<10 && !$slide['true_false_field_name']) {
      // count is < 10 and this slide should not be shown
      // select a different slide
      $slide = array_rand($component_fields['slides']);
      $slide = $component_fields['slides'][$slide];
      $count++;
    }
    
  • @superpotato Actually, do to the way that update_post_meta works only fields that have new values are updated but WP still does a get query to check to see if it needs to be updated. This is the main issue. WP might actually be performing multiple queries for every field save.


    @peterhintondesign
    I would probably have used a CPT for this rather than a repeater if I knew ahead of time that the rows would grow to this level.

    There is no solution. The only real solution is to understand the problem and devise a solution that does not cause issues. For older sites that have this problem I have created a solution to the timeout issue, which is to detect potential timeouts, intercept them, let the save complete and and then send the user on his way after that. https://github.com/Hube2/acf-prevent-timeouts/

  • I’ve got the sub fields in the first repeater posting fine. But, I can’t quite figure out how to get the nested repeater working properly.

    Here’s the code I have so far:

    $event_field_key = ‘field_535e6b9ffe3da’;

    $events[] = array(
    ‘start-date’ => $startDate,
    ‘end-date’ => $endDate,
    ‘notes’ => $_POST[‘p’.$p.’-notes’],
    ‘start-end-times’ => array(
    ‘start-time’ => ’09:00′, // would be dynamic
    ‘end-time’ => ’17:00′ // would be dynamic
    )
    );

    update_field($event_field_key, $events, $post_id);
    I’m not sure if I can just nest another array in there, or if I need to do something else.

  • I know this is an old post and was solved, but wanted to ask, what if the Events fields were in repeater fields? I tried to modify as below, but not getting the right results.

    add_action('acf/save_post', 'save_event_update_address', 20);
    function save_event_update_address($post_id) {
      if (get_post_type($post_id) != 'events') {
        // not and event post, bail
        return;
      }
      // get location post ID
      // you said it's a relationship field, a relationship field will turn an array of posts
      // I am setting the 3rd parameter because we only need the IDs
      $related_places = get_sub_field('relationship_field_name');
      // also the 
      if ($related_places) {
        $place_id = $related_places[0];
        $address = get_field('address_field_on_place_name', $place_id);
        update_sub_field('address_field_on_event_repeater_name, $address, $post_id);
      }
    }
  • Hi,

    So i have a repeater inside post-type ‘properties’ that stores Lot No and Auction Date for all the Auctions a property is in.

    When going into an event page, say for 12th August it needs to list all of the properties in this auction in Lot No order.

    When i use WP Query i’m doing it as so:

            function my_posts_where( $where ) {
    
            	$where = str_replace("meta_key = 'auctions_$", "meta_key LIKE 'auctions_%", $where);
    
            	return $where;
            }
    
            add_filter('posts_where', 'my_posts_where');
    
            $args = array (
                'post_type'=>'properties',
                'post_status'=>'publish',
                'posts_per_page'=> 40,
                'paged'=> $paged,
                'suppress_filters' => false,
                'meta_query' => array(
                 'proparray' => array(
                   'key' => 'auctions_$_auction_date',
                   'value' => $today2,
                   'compare' => 'LIKE',
                 ),
                 'lot-nos' => array(
                   'key' => 'auctions_$_lot_no',
                   'type' => 'NUMERIC',
    
                ),
            ),
           'orderby' => array(
              //  'auction-dates' => 'ASC',
                'lot-nos' => 'ASC',
            ),
              );
            $wpb_all_query = new WP_Query($args);

    My problem is that it’s picking up Lot Nos from other rows. So if a property has the following date:

    Auction Date : 7th June 2020
    Lot No: 2
    Auction Date: 12th August 2020
    Lot No: 14

    It is picking up the auction date 12th August 2020, but ordering it as Lot No 2, NOT 14. I need it to match to the specific row of the date in question, then get the Lot No from that row. is this possible?

  • Hello,
    I’m having a repeater working as an events list.

    I managed to sort them by date but, what I would like to achieve is that it only shows the year once if multiple events are happening in the same year.

    Currently:

    2020. Event 1
    2020. Event 2
    2020. Event 3
    2019. Event 4
    2018. Event 5
    2017. Event 6
    2017. Event 7
    2016. Event 8

    What I want:

    2020. Event 1
    Event 2
    Event 3
    2019. Event 4
    2018. Event 5
    2017. Event 6
    Event 7
    2016. Event 8

    Is this possible?
    I know that WordPress native date function shows it repeated years only once unless you echo them.

    Here’s my code:

    <?php
    
                    $repeater = get_field('press');
                    $order = array();
    
                    foreach ($repeater as $i => $row) {
                        $order[$i] = strtotime($row['date']);
                    }
    
                    array_multisort($order, SORT_DESC, $repeater);
    
                    if ($repeater): ?>
    
    				<ol style="list-style-type:none;">
    				    <?php foreach ($repeater as $i => $row): ?>
    				        <li>
    				        <?php echo $row['date']; ?> <a href="<?php echo
                    $row['link']; ?>" target="_blank"><?php echo $row['article']; ?>
    				</a>
    				        </li>
    				<?php endforeach; ?>
    				</ol>
    
    				<?php else:
                        echo '<p>No press yet!</p>';
                    endif; ?>
  • Hmm, I guess there are two solutions to this. The first would be to create a nested repeater, i. e. one repeater for the event dates, and inside that, another repeater for event title and description. And then you loop over the dates, and in each iteration, you loop over the nested repeater to retrieve the other two field values. The documentation describes such a scenario in the section titled “Nested loops”.

    The other option would be to create an associative array, but for that, you can’t use array_push(), you need to use the square bracket notation with the date string as key, like so:
    $events[$event_day] = $single_event;

  • This was very useful and pointed me in the right direction. I’m not an expert by any means, so forgive me If what I’m saying is mistaken. The code seems to have to small errors, that can go silently unreported and prevent admin pages from saving properly, at least that was my experience and it took me forever to realize what is going on.

    Below I’m pasting the amended code, with comments on what was missing or needs to be changed in case someone else, like me, needs to use this. Thanks so much anyways because this made a difference.

    
    add_action('acf/save_post', 'update_repeater_post_terms');
    function update_repeater_post_terms($post_id) {
      if (get_post_type($post_id) != 'YOUR POST TYPE HERE') {
        return;
      }
      $terms = NULL; // this will clear terms if none found
      if (have_rows('YOUR REPEATER', $post_id)) {
        $terms = array();
        while (have_rows('YOUR REPEATER', $post_id)) {
    
          // SET THE ROW, WAS MISSING      
          the_row();
          // add this term to the array
          $terms[] = get_sub_field('YOUR SUB FIELD', false); // false for no formatting
        }
      }
    
      // DO NOT THINK THIS IS THE RIGHT WAY, set_objects_terms is a hook 
      // set_object_terms($post_id, $terms, 'YOUR TAXONOMY HERE', false);
      // INSTEAD WE NEED THIS SIMILARLY NAMED FUNCTION:
      wp_set_object_terms($post_id, $terms, 'YOUR TAXONOMY HERE', false); 
    
    }
    
  • Hello, I’ve fixed @nerd-attack solution for drag&drop also arrays like gallery field etc.

    
    // acf drag n drop flexible layouts between repeaters
    add_action('acf/input/admin_footer', function () {
        ?>
        <script type="text/javascript">
    
            (function($) {
    
                acf.add_action('ready', function($el){
                    $(".values").sortable({
                        connectWith: ".values",
                        start: function(event, ui) {
                            acf.do_action('sortstart', ui.item, ui.placeholder);
                        },
                        stop: function(event, ui) {
                            acf.do_action('sortstop', ui.item, ui.placeholder);
                            $(this).find('.mce-tinymce').each(function() {
                                tinyMCE.execCommand('mceRemoveControl', true, $(this).attr('id'));
                                tinyMCE.execCommand('mceAddControl', true, $(this).attr('id'));
                            });
                        }
                    });
                });
    
                acf.add_action('sortstop', function ($el) {
    
    		// check if the dropped element is within a repeater field
    		if ($($el).parents('.acf-input > .acf-repeater').length) {
    
    			// get column_num from closest acf-row
    			var column_num = $($el).closest('.acf-row').attr('data-id');
    
    			// loop all (input) fields within dropped element and change / fix name
    			$($el).find('[name^="acf[field_"]').each(function () {
    				var field_name = $(this).attr('name');
    				field_name = field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
    				field_name[1] = '[' + column_num + ']'; // set the new row name
    				var new_name = 'acf' + field_name.join('');
    				$(this).attr('name', new_name);
    			});
    
    			// get closest flexible-content-field and loop all layouts within this flexible-content-field
    			$($el).closest('.acf-field.acf-field-flexible-content').find('.acf-input > .acf-flexible-content > .values > .layout').each(function (index) {
    
    				// update order number
    				$(this).find('.acf-fc-layout-order:first').html(index + 1);
    
    				// loop all (input) fields within dropped element and change / fix name
    				$(this).find('[name^="acf[field_"]').each(function () {
    					var field_name = $(this).attr('name');
    					var is_array = field_name.endsWith('[]')
    					field_name = field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
    					var tempIndex = parseInt(field_name[3].match(/([0-9]+)/g)); // hacky code
    					field_name[3] = field_name[3].replace(tempIndex, index); // set the new index
    					var new_name = 'acf' + field_name.join('');
    
    					$(this).attr('name', new_name + is_array ? '[]' : '');
    				});
    
    				// click already selected buttons to trigger conditional logics
    				$(this).find('.acf-button-group label.selected').trigger('click');
    			});
    		}
    	});
    
            })(jQuery);
    
        </script>
        <?php
    });
    
  • If I were going to create anything like the events you want to set up and I planned on sorting them or showing one of them or in any way outputting them in any way other than as entered in the repeater… I would create a custom post type.

    The CPT archive template would be used for showing the list, filtered to only show future dates and the single CPT template would show a single event.

  • This solution is working for me (ACF 5.8.7):

    // acf drag n drop flexible layouts between repeaters
    add_action('acf/input/admin_footer', function () {
        ?>
        <script type="text/javascript">
    
            (function($) {
    
                acf.add_action('ready', function($el){
                    $(".values").sortable({
                        connectWith: ".values",
                        start: function(event, ui) {
                            acf.do_action('sortstart', ui.item, ui.placeholder);
                        },
                        stop: function(event, ui) {
                            acf.do_action('sortstop', ui.item, ui.placeholder);
                            $(this).find('.mce-tinymce').each(function() {
                                tinyMCE.execCommand('mceRemoveControl', true, $(this).attr('id'));
                                tinyMCE.execCommand('mceAddControl', true, $(this).attr('id'));
                            });
                        }
                    });
                });
    
                acf.add_action('sortstop', function ($el) {
    
                    // check if the dropped element is within a repeater field
                    if($($el).parents('.acf-input > .acf-repeater').length) {
    
                        // get column_num from closest acf-row
                        var column_num = $($el).closest('.acf-row').attr('data-id');
    
                        // loop all (input) fields within dropped element and change / fix name
                        $($el).find('[name^="acf[field_"]').each(function() {
                            var field_name 		= 	$(this).attr('name');
                            field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                            field_name[1]       =   '[' + column_num + ']'; // set the new row name
                            var new_name        =   'acf' + field_name.join('');
                            $(this).attr('name', new_name);
                        });
    
                        // get closest flexible-content-field and loop all layouts within this flexible-content-field
                        $($el).closest('.acf-field.acf-field-flexible-content').find('.acf-input > .acf-flexible-content > .values > .layout').each(function(index) {
    
                            // update order number
                            $(this).find('.acf-fc-layout-order:first').html(index+1);
    
                            // loop all (input) fields within dropped element and change / fix name
                            $(this).find('[name^="acf[field_"]').each(function() {
                                var field_name 		= 	$(this).attr('name');
                                field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                                var tempIndex       =   parseInt(field_name[3].match(/([0-9]+)/g)); // hacky code
                                field_name[3]       =   field_name[3].replace(tempIndex, index); // set the new index
                                var new_name        =   'acf' + field_name.join('');
                                $(this).attr('name', new_name);
                            });
    
                            // click already selected buttons to trigger conditional logics
                            $(this).find('.acf-button-group label.selected').trigger('click');
                        });
                    }
                });
    
            })(jQuery);
    
        </script>
        <?php
    });
  • ACF Version 5.8.7

    // acfDragNDropFlexibleLayoutsBetweenRepeaters
    // orginal from https://support.advancedcustomfields.com/forums/topic/drag-flexible-content-layouts-between-parent-repeaters/
    add_action('acf/input/admin_footer', function () {
        ?>
        <script type="text/javascript">
    
            (function($) {
    
                acf.add_action('ready', function($el){
                    $(".values").sortable({
                        connectWith: ".values",
                        start: function(event, ui) {
                            acf.do_action('sortstart', ui.item, ui.placeholder);
                        },
                        stop: function(event, ui) {
                            acf.do_action('sortstop', ui.item, ui.placeholder);
                            $(this).find('.mce-tinymce').each(function() {
                                tinyMCE.execCommand('mceRemoveControl', true, $(this).attr('id'));
                                tinyMCE.execCommand('mceAddControl', true, $(this).attr('id'));
                            });
                        }
                    });
                });
    
                acf.add_action('sortstop', function ($el) {
    
                    // check if the dropped element is within a repeater field
                    if($($el).parents('.acf-input > .acf-repeater').length) {
    
                        // get column_num from closest acf-row
                        var column_num = $($el).closest('.acf-row').attr('data-id');
    
                        // loop all (input) fields within dropped element and change / fix name
                        $($el).find('[name^="acf[field_"]').each(function() {
                            var field_name 		= 	$(this).attr('name');
                            field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                            field_name[1]       =   '[' + column_num + ']'; // set the new row name
                            var new_name        =   'acf' + field_name.join('');
                            $(this).attr('name', new_name);
                        });
    
                        // get closest flexible-content-field and loop all layouts within this flexible-content-field
                        $($el).closest('.acf-field.acf-field-flexible-content').find('.acf-input > .acf-flexible-content > .values > .layout').each(function(index) {
    
                            // update order number
                            $(this).find('.acf-fc-layout-order:first').html(index+1);
    
                            // loop all (input) fields within dropped element and change / fix name
                            $(this).find('[name^="acf[field_"]').each(function() {
                                var field_name 		= 	$(this).attr('name');
                                field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                                var tempIndex       =   parseInt(field_name[3].match(/([0-9]+)/g)); // hacky code
                                field_name[3]       =   field_name[3].replace(tempIndex, index); // set the new index
                                var new_name        =   'acf' + field_name.join('');
                                $(this).attr('name', new_name);
                            });
    
                            // click already selected buttons to trigger conditional logics
                            $(this).find('.acf-button-group label.selected').trigger('click');
                        });
                    }
                });
    
            })(jQuery);
    
            function GetSubstringIndex(str, substring, n) {
                var times = 0, index = null;
                while (times < n && index !== -1) {
                    index = str.indexOf(substring, index+1);
                    times++;
                }
                return index;
            }
    
        </script>
        <?php
    });
  • New version, works with 5.8.7:

    // acfDragNDropFlexibleLayoutsBetweenRepeaters
    // orginal from https://support.advancedcustomfields.com/forums/topic/drag-flexible-content-layouts-between-parent-repeaters/
    add_action('acf/input/admin_footer', function () {
        ?>
        <script type="text/javascript">
    
            (function($) {
    
                acf.add_action('ready', function($el){
                    $(".values").sortable({
                        connectWith: ".values",
                        start: function(event, ui) {
                            acf.do_action('sortstart', ui.item, ui.placeholder);
                        },
                        stop: function(event, ui) {
                            acf.do_action('sortstop', ui.item, ui.placeholder);
                            $(this).find('.mce-tinymce').each(function() {
                                tinyMCE.execCommand('mceRemoveControl', true, $(this).attr('id'));
                                tinyMCE.execCommand('mceAddControl', true, $(this).attr('id'));
                            });
                        }
                    });
                });
    
                acf.add_action('sortstop', function ($el) {
    
                    // check if the dropped element is within a repeater field
                    if($($el).parents('.acf-input > .acf-repeater').length) {
    
                        // get column_num from closest acf-row
                        var column_num = $($el).closest('.acf-row').attr('data-id');
    
                        // loop all (input) fields within dropped element and change / fix name
                        $($el).find('[name^="acf[field_"]').each(function() {
                            var field_name 		= 	$(this).attr('name');
                            field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                            field_name[1]       =   '[' + column_num + ']'; // set the new row name
                            var new_name        =   'acf' + field_name.join('');
                            $(this).attr('name', new_name);
                        });
    
                        // get closest flexible-content-field and loop all layouts within this flexible-content-field
                        $($el).closest('.acf-field.acf-field-flexible-content').find('.acf-input > .acf-flexible-content > .values > .layout').each(function(index) {
    
                            // update order number
                            $(this).find('.acf-fc-layout-order:first').html(index+1);
    
                            // loop all (input) fields within dropped element and change / fix name
                            $(this).find('[name^="acf[field_"]').each(function() {
                                var field_name 		= 	$(this).attr('name');
                                field_name          =   field_name.match(/\[([a-zA-Z0-9_-]+\])/g); // split name attribute
                                var tempIndex       =   parseInt(field_name[3].match(/([0-9]+)/g)); // hacky code
                                field_name[3].replace(tempIndex, tempIndex+1); // set the new index
                                var new_name        =   'acf' + field_name.join('');
                                $(this).attr('name', new_name);
                            });
    
                            // click already selected buttons to trigger conditional logics
                            $(this).find('.acf-button-group label.selected').trigger('click');
                        });
                    }
                });
    
            })(jQuery);
    
            function GetSubstringIndex(str, substring, n) {
                var times = 0, index = null;
                while (times < n && index !== -1) {
                    index = str.indexOf(substring, index+1);
                    times++;
                }
                return index;
            }
    
        </script>
        <?php
    });
  • Yes, as you can see in the JS source code I submitted earlier.

    jQuery(document).ready(function($){
    		if (typeof acf == 'undefined') { return; }
    		
    		var unique_repeater_checkbox = acf.ajax.extend({
    			/*
    					why am I extenting the acf.ajax method/property
    					since I'm not using ajax in this example?
    					
    					It's easier. Since most of the time when I'm going to be
    					adding functionality to ACF I'm more than likely going to
    					be adding several actions and one of them is more than likely
    					going to include some kind of ajax. I'm more than likely going
    					to build it all into a single extension for the site and I would
    					put all of my events and functions in a that single extension and
    					call it something like {$client's name}_acf_extension
    			*/
    			
    			events: {
    				// for each field that you want to apply this to add a 'change' event line
    				// and copy the field key for the field and paste it in the "data-key" value
    				'change [data-key="field_5d945ca8ae892"] input': '_update_unique_checkbox',
    			},
    			
    			_update_unique_checkbox: function(e) {
    				var $checked = e.$el.prop('checked');
    				if (!$checked) {
    					// prevent the field from being unchecked and return
    					e.$el.prop('checked', true);
    					return;
    				}
    				// the field is checked, get the currently selected item
    				var $id = e.$el.prop('id');
    				// get the data-key
    				var $key = e.$el.closest('.acf-field').attr('data-key');
    				
    				// get the field from all of the rows in the repeater
    				// exclude hidden fields and the ACF clone row
    				var $list = $('[data-key="'+$key+'"] input').not('[data-key="'+$key+'"] input[type="hidden"]').not('.acf-clone [data-key="'+$key+'"] input');
    				if ($list.length == 1) {
    					// if there is only one row then bail
    					// nothing needs to be done
    					return;
    				}
    				// uncheck all of the other rows except the currently checked one
    				for (i=0; i<$list.length; i++) {
    					var $item_id = $list[i].getAttribute('id');
    					if ($id != $item_id) {
    						// if not the current item then set to false
    						$list[i].checked = false;
    					}
    				}
    			},
    			
    		});
    		
    	});
  • What a great idea!

    Ok, so I tried this by putting this code in functions.php

    	// enqueue our JS when ACF envques scripts
    	add_action('acf/input/admin_enqueue_scripts', 'unique_repeater_checkbox_enqueue_script');
    	
    	function unique_repeater_checkbox_enqueue_script() {
    		// enqueue acf extenstion
    		
    		// only enqueue the script on the post page where it needs to run
    		/* *** THIS IS IMPORTANT
    					 ACF uses the same scripts as well as the same field identification
    					 markup (the data-key attribute) if the ACF field group editor
    					 because of this, if you load and run your custom javascript on
    					 the field group editor page it can have unintended side effects
    					 on this page. It is important to alway make sure you're only
    					 loading scripts where you need them.
    		*/
    			
    		// your should change this to check for whatever
    		// admin page(s) you want the script to load on
    		global $post;
    		if (!$post ||
    				!isset($post->ID) || 
    				get_post_type($post->ID) != 'page') {
    			return;
    		}
    			
    		$handle = 'acf-unique-repeater-checkbox';
    		
    		// I'm using this method to set the src because
    		// I don't know where this file will be located
    		// you should alter this to use the correct fundtions
    		// to set the src value to point to the javascript file
    		$version = acf_get_setting('version');
    		if (version_compare($acf_version, '5.7.0', '<')) {
    			$src = get_template_directory_uri() . '/library/js/unique-repeater-checkbox.js';
    		} else {
    			$src = get_template_directory_uri() . '/library/js/unique-repeater-checkbox-acf57.js';
    		}
    		// make this script dependent on acf-input
    		$depends = array('acf-input');
    		
    		wp_enqueue_script($handle, $src, $depends);
    		
    	} // end function unique_repeater_checkbox_enqueue_script

    Where I changed the post type to page since that’s where I load the repeater. And I changed the source so that it will load the JS while editing the specific page.

    It seems to load the “unique-repeater-checkbox.js” NOT the “unique-repeater-checkbox-acf57.js”.

    The JS file looks like this where I edited the data-key to match the true/false field.

    
    	jQuery(document).ready(function($){
    		if (typeof acf == 'undefined') { return; }
    		
    		var unique_repeater_checkbox = acf.ajax.extend({
    			/*
    					why am I extenting the acf.ajax method/property
    					since I'm not using ajax in this example?
    					
    					It's easier. Since most of the time when I'm going to be
    					adding functionality to ACF I'm more than likely going to
    					be adding several actions and one of them is more than likely
    					going to include some kind of ajax. I'm more than likely going
    					to build it all into a single extension for the site and I would
    					put all of my events and functions in a that single extension and
    					call it something like {$client's name}_acf_extension
    			*/
    			
    			events: {
    				// for each field that you want to apply this to add a 'change' event line
    				// and copy the field key for the field and paste it in the "data-key" value
    				'change [data-key="field_5d945ca8ae892"] input': '_update_unique_checkbox',
    			},
    			
    			_update_unique_checkbox: function(e) {
    				var $checked = e.$el.prop('checked');
    				if (!$checked) {
    					// prevent the field from being unchecked and return
    					e.$el.prop('checked', true);
    					return;
    				}
    				// the field is checked, get the currently selected item
    				var $id = e.$el.prop('id');
    				// get the data-key
    				var $key = e.$el.closest('.acf-field').attr('data-key');
    				
    				// get the field from all of the rows in the repeater
    				// exclude hidden fields and the ACF clone row
    				var $list = $('[data-key="'+$key+'"] input').not('[data-key="'+$key+'"] input[type="hidden"]').not('.acf-clone [data-key="'+$key+'"] input');
    				if ($list.length == 1) {
    					// if there is only one row then bail
    					// nothing needs to be done
    					return;
    				}
    				// uncheck all of the other rows except the currently checked one
    				for (i=0; i<$list.length; i++) {
    					var $item_id = $list[i].getAttribute('id');
    					if ($id != $item_id) {
    						// if not the current item then set to false
    						$list[i].checked = false;
    					}
    				}
    			},
    			
    		});
    		
    	});

    But it still doesn’t work. When I have one checkbox checked and check another one it doesn’t uncheck the first one. Regardless of if I “Update” the page or not. Worth mentioning is that I also do not have the Styled UI on for that field. It doesn’t say anything in the console.

    What might be wrong?

    Wordpress version: 5.2.3
    ACF PRO version: 5.8.4

  • When you are talking about saving the child post, are you using two forms ? Do you have 1 field group containing all your fields and at the saving step you are using the acf/save_post hooks to separate the data into the good post type?

    I have 2 different field groups, I have a custom location rule that shows one field group on top level posts and one field group on child posts. I’m not using 2 post types, I am using one hierarchical post type.

    In the field group for the parent post I have a repeater field that has sub fields, for example “start_date” and “end_date”. There are other fields on the parent post that are also important, for example I have a field that is not in the repeater to allow setting the event as “featured”, things like this also need to be applied to the child posts. The repeater here is the data I need for creation of any child posts.

    Each field I need to copy from the parent or the above repeater has a corresponding field on the child post group. For example if I need “start_date” from the repeater the child post group has a field named “start_date” (not in a repeater)

    When the top level post is saved I have an action on acf/save_post. This action does a comparison between the content in the repeaters (I loop over the repeater) against all existing child posts to see what I need to delete and what I need to add. Then I delete any child posts that are no longer valid and add anything that is new using wp_insert_post() and then I use update_field() using the ID of the newly created post and the value I need from the parent or the repeater on the parent.

    But like I said, you also need to deal with what happens when you delete, trash, untrash, or change the status of the parent post. All of this is done because I need to query the information for individual posts and the data in the repeater is really useless in that form.

    With this setup you could have a list of each client and everything about them with a link to edit each client.

  • The main issue I see with your plan is on the front end of the site having multiple clients listed with a repeater for each client. The issue here is that ACF cannot handle updating repeaters attached to different posts at the same time. The reason for this is that the fields that ACF would display would be duplicates, in other words the name and id attributes of the fields would be duplicated for each repeater. There really is no easy way to update ACF field in bulk this way.

    One way around this would be to have multiple forms on using multiple calls to acf_form(), one for each client.

    Other than having multiple forms that each need to be submitted separately you would need to build your own front end form and not use ACF and then you’d need to build your own form processor that would save all the fields to the correct place. Possible, but not something that I would do.

    I would likely make it so that each client would need to be edited separately.

    ——————-

    As for the multiple post types, this is something to think about and may not be for everyone…

    So I recently did a thing that is quite similar, it was not clients and a call log, but, I have one post that holds the main information and I have multiple other posts that hold details about each item in the repeater. My needs were a lot more simple as it was for events that can have multiple dates.

    Here is how my events feature works.

    I have a post type called event, on this page there is a repeater field that holds dates and other information specific to each date for these events. When this post is saved a child post of the event post is created for every date entered into the repeater. The reason for this is that it gives the client an easy interface for entering the dates and it also allows me to have a separate post for each date with detailed information about the event on that date. This was important because every event date must have it’s own post in order to display the event multiple times on the “upcoming events” page. As you may or may not know, it is impossible to make WP show the same post multiple times on a standard WP archive page. This setup allows me to use the single file archive-event.php to show events and have them seemingly appear multiple times. The rest of the work is a little more complicated, but being able to use the built in logic for the archive page saved more time than the rest of the work took.

    The client does not know that these child posts exist. These are hidden in the admin and there isn’t any way for the client to directly edit these posts. The whole thing is a bit complicated but my goal was the same as yours, to give the person entering the information an easy interface.

    On the front end of the site I alter the query for archive pages using a pre_get_post filter that forces only querying for child posts. Then I display data from the child post or the parent post depending on where it is stored. All links that are added all point to the parent post. In addition to this I have code that will redirect any requests for a child post to the parent post.

    In the admin I have a pre_get_posts filter that hides all of the child posts in the post list as well as a redirect in the admin that will redirect to the parent post editor should someone attempt to edit the child post directly… unless it is me that’s looking at it.

    Creation of the child posts is all done using an acf/save_post filter.

    There are other filters as well, to be honest I probably couldn’t remember them all without looking at the code, but there are filters to handle deletion of values in the repeater as well and changes made to it. And there are other filters that handle things like the deletion of a parent post or changing the status of the parent post, etc.

    There are also 2 field groups, one group with the repeater that only appears on top level posts and another field group with individual fields that is only used for the child posts.

    This does mean that there is duplication of data in the database. Any of the values from the repeater fields that I need are duplicated to the child posts that are created, each field in the repeater has a dedicated top level field for the child posts. But it does mean that I can query for posts using that information directly instead of trying to query data in a repeater.

  • Figured it out!

    There’s a section of assets/js/acf_input.js that interfaces with the WordPress media library. Unfortunately it specifically targets the image field type. I ended up copying a big lump of javascript and changing the type identifier… here’s the code that I copied, notice that I just changed the ‘type’ parameter and it all worked.

    I’m sure there must be an easier way to reuse this… I assume some field authors have figured out a way to include a media picker in a more subtle way. I reckon this page would be helpful if I had time to investigate

    
    (function($, undefined){
    	
    	var Field = acf.Field.extend({
    		
    		type: 'my_new_field',
    		
    		$control: function(){
    			return this.$('.acf-image-uploader');
    		},
    		
    		$input: function(){
    			return this.$('input[type="hidden"]');
    		},
    		
    		events: {
    			'click a[data-name="add"]': 	'onClickAdd',
    			'click a[data-name="edit"]': 	'onClickEdit',
    			'click a[data-name="remove"]':	'onClickRemove',
    			'change input[type="file"]':	'onChange'
    		},
    		
    		initialize: function(){
    			
    			// add attribute to form
    			if( this.get('uploader') === 'basic' ) {
    				this.$el.closest('form').attr('enctype', 'multipart/form-data');
    			}
    		},
    		
    		validateAttachment: function( attachment ){
    			
    			// defaults
    			attachment = attachment || {};
    			
    			// WP attachment
    			if( attachment.id !== undefined ) {
    				attachment = attachment.attributes;
    			}
    			
    			// args
    			attachment = acf.parseArgs(attachment, {
    				url: '',
    				alt: '',
    				title: '',
    				caption: '',
    				description: '',
    				width: 0,
    				height: 0
    			});
    			
    			// preview size
    			var url = acf.isget(attachment, 'sizes', this.get('preview_size'), 'url');
    			if( url !== null ) {
    				attachment.url = url;
    			}
    			
    			// return
    			return attachment;
    		},
    		
    		render: function( attachment ){
    			
    			// vars
    			attachment = this.validateAttachment( attachment );
    			
    			// update image
    		 	this.$('img').attr({
    			 	src: attachment.url,
    			 	alt: attachment.alt,
    			 	title: attachment.title
    		 	});
    		 	
    			// vars
    			var val = attachment.id || '';
    						
    			// update val
    			this.val( val );
    		 	
    		 	// update class
    		 	if( val ) {
    			 	this.$control().addClass('has-value');
    		 	} else {
    			 	this.$control().removeClass('has-value');
    		 	}
    		},
    		
    		// create a new repeater row and render value
    		append: function( attachment, parent ){
    			
    			// create function to find next available field within parent
    			var getNext = function( field, parent ){
    				
    				// find existing file fields within parent
    				var fields = acf.getFields({
    					key: 	field.get('key'),
    					parent: parent.$el
    				});
    				
    				// find the first field with no value
    				for( var i = 0; i < fields.length; i++ ) {
    					if( !fields[i].val() ) {
    						return fields[i];
    					}
    				}
    								
    				// return
    				return false;
    			}
    			
    			// find existing file fields within parent
    			var field = getNext( this, parent );
    			
    			// add new row if no available field
    			if( !field ) {
    				parent.$('.acf-button:last').trigger('click');
    				field = getNext( this, parent );
    			}
    					
    			// render
    			if( field ) {
    				field.render( attachment );
    			}
    		},
    		
    		selectAttachment: function(){
    			
    			// vars
    			var parent = this.parent();
    			var multiple = (parent && parent.get('type') === 'repeater');
    			
    			// new frame
    			var frame = acf.newMediaPopup({
    				mode:			'select',
    				type:			'image',
    				title:			acf.__('Select Image'),
    				field:			this.get('key'),
    				multiple:		multiple,
    				library:		this.get('library'),
    				allowedTypes:	this.get('mime_types'),
    				select:			$.proxy(function( attachment, i ) {
    					if( i > 0 ) {
    						this.append( attachment, parent );
    					} else {
    						this.render( attachment );
    					}
    				}, this)
    			});
    		},
    		
    		editAttachment: function(){
    			
    			// vars
    			var val = this.val();
    			
    			// bail early if no val
    			if( !val ) return;
    			
    			// popup
    			var frame = acf.newMediaPopup({
    				mode:		'edit',
    				title:		acf.__('Edit Image'),
    				button:		acf.__('Update Image'),
    				attachment:	val,
    				field:		this.get('key'),
    				select:		$.proxy(function( attachment, i ) {
    					this.render( attachment );
    				}, this)
    			});
    		},
    		
    		removeAttachment: function(){
    	        this.render( false );
    		},
    		
    		onClickAdd: function( e, $el ){
    			this.selectAttachment();
    		},
    		
    		onClickEdit: function( e, $el ){
    			this.editAttachment();
    		},
    		
    		onClickRemove: function( e, $el ){
    			this.removeAttachment();
    		},
    		
    		onChange: function( e, $el ){
    			var $hiddenInput = this.$input();
    			
    			acf.getFileInputData($el, function( data ){
    				$hiddenInput.val( $.param(data) );
    			});
    		}
    	});
    	
    	acf.registerFieldType( Field );
    
    })(jQuery);
    

  • Hi
    Here is my version!

    • Plugin: Advanced Custom Fields PRO Version 5.7.13
    • Field-Structure: ‘repeater’ > ‘flexible_content’

    Big Thanks To Retani

    
    		function acfDragNDropFlexibleLayoutsBetweenRepeaters() {
    ?>
    			<script type="text/javascript">
    				
    				(function($) {
    
    					acf.add_action('ready', function($el){
    						$(".values").sortable({
    							connectWith: ".values",
    							start: function(event, ui) {
    								acf.do_action('sortstart', ui.item, ui.placeholder);
    							},
    							stop: function(event, ui) {
    								acf.do_action('sortstop', ui.item, ui.placeholder);
    								$(this).find('.mce-tinymce').each(function() {
    									tinyMCE.execCommand('mceRemoveControl', true, $(this).attr('id'));
    									tinyMCE.execCommand('mceAddControl', true, $(this).attr('id'));
    								});
    							}
    						});
    					});
    
    					acf.add_action('sortstop', function ($el) {
    
    						// check if the dropped element is within a repeater field
    							if($($el).parents('.acf-input > .acf-repeater').length) {
    
    								// get column_num from closest acf-row
    									var column_num = $($el).closest('.acf-row').attr('data-id');
    
    								// loop all (input) fields within dropped element and change / fix name
    									$($el).find('[name^="acf[field_"]').each(function() {
    										var field_name 		= 	$(this).attr('name');
    										var index_location 	= 	field_name.indexOf(']')+2;
    										var new_name 		= 	field_name.substr(0, index_location) + column_num + field_name.substr(index_location+1);
    										$(this).attr('name', new_name);
    									});
    
    								// get closest flexible-content-field and loop all layouts within this flexible-content-field
    									$($el).closest('.acf-field.acf-field-flexible-content').find('.acf-input > .acf-flexible-content > .values > .layout').each(function(index) {
    
    										// update order number
    											$(this).find('.acf-fc-layout-order:first').html(index+1);
    										
    										// loop all (input) fields within dropped element and change / fix name
    											$(this).find('[name^="acf[field_"]').each(function() {
    												var field_name 		= 	$(this).attr('name');
    												var index_location 	= 	GetSubstringIndex(field_name,']', 3)+2;
    												var new_name 		= 	field_name.substr(0, index_location) + index + field_name.substr(index_location+1);
    												$(this).attr('name', new_name);
    											});
    
    										// click already selected buttons to trigger conditional logics
    											$(this).find('.acf-button-group label.selected').trigger('click');
    									});
    							}
    					});
    
    				})(jQuery); 
    
    				function GetSubstringIndex(str, substring, n) {
    					var times = 0, index = null;
    					while (times < n && index !== -1) {
    						index = str.indexOf(substring, index+1);
    						times++;
    					}
    					return index;
    				}
    
    			</script>
    <?php
    		}
    
    		add_action('acf/input/admin_footer', 'acfDragNDropFlexibleLayoutsBetweenRepeaters');
    
  • It is not possible to order the posts by a repeater sub field, so what you want to do is not possible. Even if it were possible, the nature of WP_Query would give you additional problems.

    Let’s say for example that “Show 1” is on “date 1” and “date 2” while “Show 2” is on “date 1” and “date 3”. Using WP_Query you will only see each “Show” listed once.

    
    Date 1
      => Show 1
      => Show 2
    
    Date 2
       Nothing listed, show 1 already shown
    
    Date 3
      Nothing listed, show 2 already shown
    

    I am actually currently working on a project that has a similar problem. The client wants “Events”. Each event can happen on multiple dates. Basically the same thing that you are doing. I have no choice but to use a repeater for this. How am I solving this.

    1) I’ve made my post type hierarchical.

    2) On top level posts I have a field group with the repeater. On child posts I have a field group that contains just a start date/time and an end date/time field. This requires a custom location rule.

    3) When an event is saved I have an acf/save_post action that creates creates and deletes child posts for the event based on the dates saved in the repeater field.

    4) In the admin list of posts I am hiding the child posts so that the client cannot see them. I am also hiding the fact that they can create child posts. I have a filter on pre_get_posts for this post type in the admin and I’m using ACF “hide on screen” to hide the page attribute blocks. So, basically, the client will never see the fact that all these posts are being added and deleted.

    I will post the relevant code for the above at the end of this.

    The remaining is not done. When showing posts on the front end I will do a pre_get_posts filter that will remove parent posts from the query and order all of the child posts by their start date/end date fields. When showing links I will link to the parent post instead of the child post. I’m probably also going to need to limit the number of dates that the client is allowed to add so that updating a post does not time out.

    The following code has not been made to work for your needs, it is just provided as as example of what I’ve done so far. The only thing that I’ve done is remove the client’s name from the code. It also has not been completely tested since I’m in the process of building it.

    
    <?php 
      
      class client_name_events {
        
        private $post_type = 'events';
        
        public function __construct() {
          add_action('pre_get_posts', array($this, 'hide_children_in_admin'));
          add_filter('acf/location/rule_types', array($this, 'acf_location_rule_types'));
          add_filter('acf/location/rule_values/post_level', array($this, 'acf_location_post_level_values'));
          add_filter('acf/location/rule_match/post_level', array($this, 'acf_location_post_level_match'), 20, 3);
          add_action('acf/save_post', array($this, 'save_event'), 20);
        } // end public function __construct
        
        public function hide_children_in_admin($query) {
          if (!is_admin() || !$query->is_main_query()) {
            return;
          }
          if (!isset($query->query_vars) ||
              !isset($query->query_vars['post_type']) ||
              $query->query_vars['post_type'] != $this->post_type) {
            return;
          }
          $query->set('post_parent', 0);
        } // end public function hide_children_in_admin
        
        public function save_event($post_id) {
          if (get_post_type($post_id) != $this->post_type) {
            // not our post type
            return;
          }
          $parent = wp_get_post_parent_id($post_id);
          if ($parent) {
            // this is a child post
            // this should never happen
            // it's only here to cover all bases
            return;
          }
          
          // get all dates from repeater
          $dates = array();
          if (have_rows('dates', $post_id)) {
            while (have_rows('dates', $post_id)) {
              the_row();
              $dates[] = array(
                'start' => get_sub_field('start'),
                'end' => get_sub_field('end')
              );
            }
          }
          
          // get list of existing date posts
          $existing_dates = array();
          // get all child posts
          $args = array(
            'post_type' => 'events',
            'post_parent' => $post_id,
            'numberposts' => -1,
          );
          $children = get_children($args);
          $new = array();
          $delete = array();
          if (!empty($children)) {
            foreach ($children as $id => $event) {
              $existing_dates[$id] = array(
                'id' => $id,
                'title' => $event->post_title,
                'start' => get_field('start_date', $id),
                'end' => get_field('end_date', $id)
              );
            } // end foreach children
          } // end if !empty children
          
          // create list of dates to add
          // loop over all $dates, and all $existing_dates
          // if a date does not exist add it to the list to be added
          $add = array();
          if (count($existing_dates)) {
            foreach ($dates as $date) {
              $found = false;
              foreach ($existing_dates as $existing_date) {
                if ($date['start'] == $existing_date['start'] && $date['end'] == $existing_date['end']) {
                  $found = true;
                  break;
                }
              } // end foreach existing date
              if (!$found) {
                $add[] = $date;
              }
            } // end foreach dates
          } else {
            // no existing dates
            // add them all
            $add = $dates;
          }
          
          // create list of dates to remove
          // loop over all existing dates and all dates
          // if a date does not exist then add it to list of dates to remove
          $remove = array();
          if (count($exisiting_dates)) {
            foreach ($existing_dates as $id => $existing_date) {
              $found = false;
              foreach ($dates as $date) {
                if ($date['start'] == $existing_date['start'] && $date['end'] == $existing_date['end']) {
                  $found = true;
                  break;
                }
              }
              if (!$found) {
                $remove[] = $id;
              }
            } // end foreach existing date
          } // end if existing dates
          
          // delete posts
          if (count($remove)) {
            foreach ($remove as $id) {
              wp_delete_post($id, true);
            }
          } // end if posts to remove
          
          // add posts
          if (count($add)) {
            foreach ($add as $date) {
              $post = array(
                'post_title' => $date['start'].' to '.$date['end'],
                'post_type' => 'events',
                'post_parent' => $post_id,
                'post_status' => 'publish'
              );
              $new_id = wp_insert_post($post);
              if ($new_id) {
                update_field('field_5c6eb7f6dc628', $date['start'], $new_id);
                update_field('field_5c6eb81ddc629', $date['end'], $new_id);
              }
            } // end foreach date to add
          } // end if posts to add
        } // end public function save_event
        
        public function acf_location_rule_types($choices) {
          if (!isset($choices['Other'])) {
            $choices['Other'] = array();
          }
          if (!isset($choices['Other']['post_level'])) {
            $choices['Other']['post_level'] = 'Post Level';
          }
          return $choices;
        } // end public function acf_location_rule_types
        
        public function acf_location_post_level_values($choices) {
          $choices['top'] = 'Top Level Post';
          $choices['child'] = 'Child Post';
          return $choices;
        } // end public function acf_location_post_level_values
        
        public function acf_location_post_level_match($match, $rule, $options) {
          if ($rule['param'] == 'post_level') {
            $post_id = $options['post_id'];
            $parent = wp_get_post_parent_id($post_id);
            if ($parent) {
              $level = 'child';
            } else {
              $level = 'top';
            }
          }
          switch ($rule['operator']) {
            case '==':
              $match = ($level == $rule['value']);
              break;
            case '!=':
              $match = ($level != $rule['value']);
              break;
            default:
              // do nothing
              break;
          }
          return $match;
        } // end public function acf_location_post_level_match
        
      } // end class client_name_events
      
    ?>
    
  • i have a CPT event.
    A single event can have multiple date/time/localisation
    So i use ACF repeater for each event with line: DATEPICKER / TIMEPICKER / TEXT
    i am just wondering if there is a way to optimize my wpquery
    thanks

  • It’s repeaters nested inside of a group… Very complex:

    Array
    (
        [ID] => 10198
        [key] => field_5b21445c02e41
        [label] => Event Date
        [name] => event_date
        [prefix] => acf
        [type] => group
        [value] => Array
            (
                [event_date_type] => date
                [event_single_day] => Array
                    (
                        [0] => Array
                            (
                                [event_date] => 20181219
                                [event_time] => Array
                                    (
                                        [0] => Array
                                            (
                                                [event_start_time] => 10:00:00
                                                [event_end_time] => 10:30:00
                                            )
    
                                        [1] => Array
                                            (
                                                [event_start_time] => 10:30:00
                                                [event_end_time] => 11:00:00
                                            )
    
                                    )
    
                            )
    
                    )
    
                [event_date_range] => 
                [event_recurring_weekly] => Array
                    (
                        [event_start_date] => 
                        [event_end_date] => 
                        [event_time] => 
                        [event_recurring_days] => Array
                            (
                            )
    
                    )
    
                [event_recurring_monthly] => 
            )
    
        [menu_order] => 8
        [instructions] => 
        [required] => 1
        [id] => 
        [class] => 
        [conditional_logic] => 0
        [parent] => 15
        [wrapper] => Array
            (
                [width] => 
                [class] => 
                [id] => 
            )
    
        [_name] => event_date
        [_prepare] => 0
        [_valid] => 1
        [user_roles] => Array
            (
                [0] => all
            )
    
        [layout] => block
        [sub_fields] => Array
            (
                [0] => Array
                    (
                        [ID] => 10199
                        [key] => field_5b21449202e42
                        [label] => Type
                        [name] => event_date_type
                        [prefix] => acf
                        [type] => select
                        [value] => 
                        [menu_order] => 0
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 10198
                        [wrapper] => Array
                            (
                                [width] => 25
                                [class] => 
                                [id] => 
                            )
    
                        [_name] => event_date_type
                        [_prepare] => 0
                        [_valid] => 1
                        [user_roles] => Array
                            (
                                [0] => all
                            )
    
                        [choices] => Array
                            (
                                [date] => Single Day Event
                                [range] => Date Range
                                [weekly] => Recurring Weekly
                                [monthly] => Recurring Monthly
                            )
    
                        [default_value] => Array
                            (
                                [0] => date
                            )
    
                        [allow_null] => 0
                        [multiple] => 0
                        [ui] => 0
                        [return_format] => value
                        [ajax] => 0
                        [placeholder] => 
                    )
    
                [1] => Array
                    (
                        [ID] => 10200
                        [key] => field_5b2145b902e43
                        [label] => Single Day Event
                        [name] => event_single_day
                        [prefix] => acf
                        [type] => repeater
                        [value] => 
                        [menu_order] => 1
                        [instructions] => Events that occur on a single day. You may add multiple dates and times, but each date/time is distinct and will have separate registrations, if registration is required.
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [field] => field_5b21449202e42
                                                [operator] => ==
                                                [value] => date
                                            )
    
                                    )
    
                            )
    
                        [parent] => 10198
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )
    
                        [_name] => event_single_day
                        [_prepare] => 0
                        [_valid] => 1
                        [user_roles] => Array
                            (
                                [0] => all
                            )
    
                        [collapsed] => field_5b21463202e44
                        [min] => 1
                        [max] => 0
                        [layout] => block
                        [button_label] => Add Another Date
                        [sub_fields] => Array
                            (
                                [0] => Array
                                    (
                                        [ID] => 10201
                                        [key] => field_5b21463202e44
                                        [label] => Date
                                        [name] => event_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 
                                        [menu_order] => 0
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10200
                                        [wrapper] => Array
                                            (
                                                [width] => 20
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [1] => Array
                                    (
                                        [ID] => 10202
                                        [key] => field_5b2146c83d961
                                        [label] => Time
                                        [name] => event_time
                                        [prefix] => acf
                                        [type] => repeater
                                        [value] => 
                                        [menu_order] => 1
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10200
                                        [wrapper] => Array
                                            (
                                                [width] => 79
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_time
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [collapsed] => 
                                        [min] => 1
                                        [max] => 0
                                        [layout] => table
                                        [button_label] => Add Time
                                        [sub_fields] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [ID] => 10203
                                                        [key] => field_5b2147733d964
                                                        [label] => Start Time
                                                        [name] => event_start_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 0
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10202
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 49
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_start_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 9:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 07:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [return_format] => value
                                                        [ajax] => 0
                                                        [placeholder] => 
                                                    )
    
                                                [1] => Array
                                                    (
                                                        [ID] => 10204
                                                        [key] => field_5b2147af3d965
                                                        [label] => End Time
                                                        [name] => event_end_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 1
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10202
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 50
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_end_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [user_roles] => Array
                                                            (
                                                                [0] => all
                                                            )
    
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 9:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 08:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [return_format] => value
                                                        [ajax] => 0
                                                        [placeholder] => 
                                                    )
    
                                            )
    
                                    )
    
                            )
    
                    )
    
                [2] => Array
                    (
                        [ID] => 10214
                        [key] => field_5b2155730460b
                        [label] => Date Range
                        [name] => event_date_range
                        [prefix] => acf
                        [type] => repeater
                        [value] => 
                        [menu_order] => 2
                        [instructions] => Events that occur over a range of multiple dates with no time specified. You can add multiple date ranges.
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [field] => field_5b21449202e42
                                                [operator] => ==
                                                [value] => range
                                            )
    
                                    )
    
                            )
    
                        [parent] => 10198
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )
    
                        [_name] => event_date_range
                        [_prepare] => 0
                        [_valid] => 1
                        [user_roles] => Array
                            (
                                [0] => all
                            )
    
                        [collapsed] => 
                        [min] => 1
                        [max] => 0
                        [layout] => block
                        [button_label] => Add New Date Range
                        [sub_fields] => Array
                            (
                                [0] => Array
                                    (
                                        [ID] => 10215
                                        [key] => field_5b2155e50460c
                                        [label] => Start Date
                                        [name] => event_start_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 
                                        [menu_order] => 0
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10214
                                        [wrapper] => Array
                                            (
                                                [width] => 20
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_start_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [1] => Array
                                    (
                                        [ID] => 10216
                                        [key] => field_5b2156130460d
                                        [label] => End Date
                                        [name] => event_end_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 
                                        [menu_order] => 1
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10214
                                        [wrapper] => Array
                                            (
                                                [width] => 20
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_end_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                            )
    
                    )
    
                [3] => Array
                    (
                        [ID] => 10221
                        [key] => field_5b215748a5c71
                        [label] => Recurring Weekly
                        [name] => event_recurring_weekly
                        [prefix] => acf
                        [type] => group
                        [value] => 
                        [menu_order] => 3
                        [instructions] => Select the days of the week the event will reoccur. Ex: Selecting Thursday will create the event EVERY Thursday. You can select multiple days of the week.
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [field] => field_5b21449202e42
                                                [operator] => ==
                                                [value] => weekly
                                            )
    
                                    )
    
                            )
    
                        [parent] => 10198
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )
    
                        [_name] => event_recurring_weekly
                        [_prepare] => 0
                        [_valid] => 1
                        [user_roles] => Array
                            (
                                [0] => all
                            )
    
                        [layout] => block
                        [sub_fields] => Array
                            (
                                [0] => Array
                                    (
                                        [ID] => 10223
                                        [key] => field_5b21585026e20
                                        [label] => Start Date
                                        [name] => event_start_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 12/19/2018
                                        [menu_order] => 0
                                        [instructions] => Date the event will start recurring.
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10221
                                        [wrapper] => Array
                                            (
                                                [width] => 20
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_start_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [1] => Array
                                    (
                                        [ID] => 10224
                                        [key] => field_5b21587526e21
                                        [label] => End Date
                                        [name] => event_end_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 
                                        [menu_order] => 1
                                        [instructions] => Leave blank for no end date.
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10221
                                        [wrapper] => Array
                                            (
                                                [width] => 20
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_end_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [2] => Array
                                    (
                                        [ID] => 10249
                                        [key] => field_5b2168d4f6092
                                        [label] => Time
                                        [name] => event_time
                                        [prefix] => acf
                                        [type] => repeater
                                        [value] => 
                                        [menu_order] => 2
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10221
                                        [wrapper] => Array
                                            (
                                                [width] => 49
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_time
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [collapsed] => 
                                        [min] => 1
                                        [max] => 0
                                        [layout] => table
                                        [button_label] => Add Time
                                        [sub_fields] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [ID] => 10250
                                                        [key] => field_5b2168fff6093
                                                        [label] => Start Time
                                                        [name] => event_start_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 0
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10249
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 33
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_start_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [user_roles] => Array
                                                            (
                                                                [0] => all
                                                            )
    
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 10:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 07:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [ajax] => 0
                                                        [return_format] => value
                                                        [placeholder] => 
                                                    )
    
                                                [1] => Array
                                                    (
                                                        [ID] => 10251
                                                        [key] => field_5b21692cf6094
                                                        [label] => End Time
                                                        [name] => event_end_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 1
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10249
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 33
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_end_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [user_roles] => Array
                                                            (
                                                                [0] => all
                                                            )
    
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 10:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 08:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [ajax] => 0
                                                        [return_format] => value
                                                        [placeholder] => 
                                                    )
    
                                            )
    
                                    )
    
                                [3] => Array
                                    (
                                        [ID] => 10225
                                        [key] => field_5b21589526e22
                                        [label] => Recurring Day(s)
                                        [name] => event_recurring_days
                                        [prefix] => acf
                                        [type] => checkbox
                                        [value] => 
                                        [menu_order] => 3
                                        [instructions] => Select the day(s) of the week the event will reoccur. If you select Thursday, the event will repeat EVERY Thursday. You can select more than one day of the week.
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10221
                                        [wrapper] => Array
                                            (
                                                [width] => 
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_recurring_days
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [choices] => Array
                                            (
                                                [sunday] => Sunday
                                                [monday] => Monday
                                                [tuesday] => Tuesday
                                                [wednesday] => Wednesday
                                                [thursday] => Thursday
                                                [friday] => Friday
                                                [saturday] => Saturday
                                            )
    
                                        [allow_custom] => 0
                                        [save_custom] => 0
                                        [default_value] => Array
                                            (
                                            )
    
                                        [layout] => horizontal
                                        [toggle] => 0
                                        [return_format] => value
                                    )
    
                            )
    
                    )
    
                [4] => Array
                    (
                        [ID] => 10230
                        [key] => field_5b215ddc9226e
                        [label] => Recurring Monthly
                        [name] => event_recurring_monthly
                        [prefix] => acf
                        [type] => repeater
                        [value] => 
                        [menu_order] => 4
                        [instructions] => Select the week number and day of the week the event will reoccur.
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => Array
                            (
                                [0] => Array
                                    (
                                        [0] => Array
                                            (
                                                [field] => field_5b21449202e42
                                                [operator] => ==
                                                [value] => monthly
                                            )
    
                                    )
    
                            )
    
                        [parent] => 10198
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )
    
                        [_name] => event_recurring_monthly
                        [_prepare] => 0
                        [_valid] => 1
                        [user_roles] => Array
                            (
                                [0] => all
                            )
    
                        [collapsed] => 
                        [min] => 1
                        [max] => 0
                        [layout] => block
                        [button_label] => Add Recurrance
                        [sub_fields] => Array
                            (
                                [0] => Array
                                    (
                                        [ID] => 10231
                                        [key] => field_5b215e4292273
                                        [label] => Start Date
                                        [name] => event_start_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 12/19/2018
                                        [menu_order] => 0
                                        [instructions] => Date the event will start recurring.
                                        [required] => 1
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10230
                                        [wrapper] => Array
                                            (
                                                [width] => 15
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_start_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [1] => Array
                                    (
                                        [ID] => 10232
                                        [key] => field_5b215e6292274
                                        [label] => End Date
                                        [name] => event_end_date
                                        [prefix] => acf
                                        [type] => date_picker
                                        [value] => 
                                        [menu_order] => 1
                                        [instructions] => Leave blank if there is no end date.
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10230
                                        [wrapper] => Array
                                            (
                                                [width] => 15
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_end_date
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [display_format] => m/d/Y
                                        [return_format] => Ymd
                                        [first_day] => 0
                                    )
    
                                [2] => Array
                                    (
                                        [ID] => 10233
                                        [key] => field_5b215e9e92275
                                        [label] => Recurring Week
                                        [name] => event_recurring_week
                                        [prefix] => acf
                                        [type] => select
                                        [value] => 
                                        [menu_order] => 2
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10230
                                        [wrapper] => Array
                                            (
                                                [width] => 14
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_recurring_week
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [choices] => Array
                                            (
                                                [first] => First
                                                [second] => Second
                                                [third] => Third
                                                [fourth] => Fourth
                                            )
    
                                        [default_value] => Array
                                            (
                                            )
    
                                        [allow_null] => 0
                                        [multiple] => 0
                                        [ui] => 0
                                        [ajax] => 0
                                        [return_format] => value
                                        [placeholder] => 
                                    )
    
                                [3] => Array
                                    (
                                        [ID] => 10234
                                        [key] => field_5b215eed92276
                                        [label] => Day
                                        [name] => event_recurring_day
                                        [prefix] => acf
                                        [type] => select
                                        [value] => 
                                        [menu_order] => 3
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10230
                                        [wrapper] => Array
                                            (
                                                [width] => 14
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_recurring_day
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [choices] => Array
                                            (
                                                [sunday] => Sunday
                                                [monday] => Monday
                                                [tuesday] => Tuesday
                                                [wednesday] => Wednesday
                                                [thursday] => Thursday
                                                [friday] => Friday
                                                [saturday] => Saturday
                                            )
    
                                        [default_value] => Array
                                            (
                                                [0] => friday
                                            )
    
                                        [allow_null] => 0
                                        [multiple] => 0
                                        [ui] => 0
                                        [ajax] => 0
                                        [return_format] => value
                                        [placeholder] => 
                                    )
    
                                [4] => Array
                                    (
                                        [ID] => 10257
                                        [key] => field_5b216a933dfdc
                                        [label] => Time
                                        [name] => event_time
                                        [prefix] => acf
                                        [type] => repeater
                                        [value] => 
                                        [menu_order] => 4
                                        [instructions] => 
                                        [required] => 0
                                        [id] => 
                                        [class] => 
                                        [conditional_logic] => 0
                                        [parent] => 10230
                                        [wrapper] => Array
                                            (
                                                [width] => 40
                                                [class] => 
                                                [id] => 
                                            )
    
                                        [_name] => event_time
                                        [_prepare] => 0
                                        [_valid] => 1
                                        [user_roles] => Array
                                            (
                                                [0] => all
                                            )
    
                                        [collapsed] => 
                                        [min] => 1
                                        [max] => 0
                                        [layout] => table
                                        [button_label] => Add Time
                                        [sub_fields] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [ID] => 10258
                                                        [key] => field_5b216aa53dfdd
                                                        [label] => Start Time
                                                        [name] => event_start_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 0
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10257
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 49
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_start_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [user_roles] => Array
                                                            (
                                                                [0] => all
                                                            )
    
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 10:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 07:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [ajax] => 0
                                                        [return_format] => value
                                                        [placeholder] => 
                                                    )
    
                                                [1] => Array
                                                    (
                                                        [ID] => 10259
                                                        [key] => field_5b216ad03dfde
                                                        [label] => End Time
                                                        [name] => event_end_time
                                                        [prefix] => acf
                                                        [type] => select
                                                        [value] => 
                                                        [menu_order] => 1
                                                        [instructions] => 
                                                        [required] => 0
                                                        [id] => 
                                                        [class] => 
                                                        [conditional_logic] => 0
                                                        [parent] => 10257
                                                        [wrapper] => Array
                                                            (
                                                                [width] => 49
                                                                [class] => 
                                                                [id] => 
                                                            )
    
                                                        [_name] => event_end_time
                                                        [_prepare] => 0
                                                        [_valid] => 1
                                                        [user_roles] => Array
                                                            (
                                                                [0] => all
                                                            )
    
                                                        [choices] => Array
                                                            (
                                                                [06:00:00] => 6:00am
                                                                [06:15:00] => 6:15am
                                                                [06:30:00] => 6:30am
                                                                [06:45:00] => 6:45am
                                                                [07:00:00] => 7:00am
                                                                [07:15:00] => 7:15am
                                                                [07:30:00] => 7:30am
                                                                [07:45:00] => 7:45am
                                                                [08:00:00] => 8:00am
                                                                [08:15:00] => 8:15am
                                                                [08:30:00] => 8:30am
                                                                [08:45:00] => 8:45am
                                                                [09:00:00] => 9:00am
                                                                [09:15:00] => 9:15am
                                                                [09:30:00] => 9:30am
                                                                [09:45:00] => 9:45am
                                                                [10:00:00] => 10:00am
                                                                [10:15:00] => 10:15am
                                                                [10:30:00] => 10:30am
                                                                [10:45:00] => 10:45am
                                                                [11:00:00] => 11:00am
                                                                [11:15:00] => 11:15am
                                                                [11:30:00] => 11:30am
                                                                [11:45:00] => 11:45am
                                                                [12:00:00] => 12:00pm
                                                                [12:15:00] => 12:15pm
                                                                [12:30:00] => 12:30pm
                                                                [12:45:00] => 12:45pm
                                                                [13:00:00] => 1:00pm
                                                                [13:15:00] => 1:15pm
                                                                [13:30:00] => 1:30pm
                                                                [13:45:00] => 1:45pm
                                                                [14:00:00] => 2:00pm
                                                                [14:15:00] => 2:15pm
                                                                [14:30:00] => 2:30pm
                                                                [14:45:00] => 2:45pm
                                                                [15:00:00] => 3:00pm
                                                                [15:15:00] => 3:15pm
                                                                [15:30:00] => 3:30pm
                                                                [15:45:00] => 3:45pm
                                                                [16:00:00] => 4:00pm
                                                                [16:15:00] => 4:15pm
                                                                [16:30:00] => 4:30pm
                                                                [16:45:00] => 4:45pm
                                                                [17:00:00] => 5:00pm
                                                                [17:15:00] => 5:15pm
                                                                [17:30:00] => 5:30pm
                                                                [17:45:00] => 5:45pm
                                                                [18:00:00] => 6:00pm
                                                                [18:15:00] => 6:15pm
                                                                [18:30:00] => 6:30pm
                                                                [18:45:00] => 6:45pm
                                                                [19:00:00] => 7:00pm
                                                                [19:15:00] => 7:15pm
                                                                [19:30:00] => 7:30pm
                                                                [19:45:00] => 7:45pm
                                                                [20:00:00] => 8:00pm
                                                                [20:15:00] => 8:15pm
                                                                [20:30:00] => 8:30pm
                                                                [20:45:00] => 8:45pm
                                                                [21:00:00] => 10:00pm
                                                                [21:15:00] => 9:15pm
                                                                [21:30:00] => 9:30pm
                                                                [21:45:00] => 9:45pm
                                                                [22:00:00] => 10:00pm
                                                                [22:15:00] => 10:15pm
                                                                [22:30:00] => 10:30pm
                                                                [22:45:00] => 10:45pm
                                                                [23:00:00] => 11:00pm
                                                                [23:15:00] => 11:15pm
                                                                [23:30:00] => 11:30pm
                                                                [23:45:00] => 11:45pm
                                                                [00:00:00] => 12:00am
                                                            )
    
                                                        [default_value] => Array
                                                            (
                                                                [0] => 08:00:00
                                                            )
    
                                                        [allow_null] => 0
                                                        [multiple] => 0
                                                        [ui] => 0
                                                        [ajax] => 0
                                                        [return_format] => value
                                                        [placeholder] => 
                                                    )
    
                                            )
    
                                    )
    
                            )
    
                    )
    
            )
    
    )
Viewing 25 results - 176 through 200 (of 270 total)