Esempio n. 1
0
        function edit_widget($widget, $return, $instance)
        {
            // vars
            $post_id = 0;
            if ($widget->number !== '__i__') {
                $post_id = "widget_{$widget->id}";
            }
            // get field groups
            $field_groups = acf_get_field_groups(array('widget' => $widget->id_base));
            // render
            if (!empty($field_groups)) {
                // render post data
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'widget'));
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    acf_render_fields($post_id, $fields, 'div', 'field');
                }
                if ($widget->updated) {
                    ?>
			<script type="text/javascript">
			(function($) {
				
				acf.do_action('append', $('[id^="widget"][id$="<?php 
                    echo $widget->id;
                    ?>
"]') );
				
			})(jQuery);	
			</script>
			<?php 
                }
            }
        }
Esempio n. 2
0
function acf_form($args = array())
{
    // vars
    $url = acf_get_current_url();
    // defaults
    $args = wp_parse_args($args, array('id' => 'acf-form', 'post_id' => false, 'new_post' => false, 'field_groups' => false, 'fields' => false, 'post_title' => false, 'post_content' => false, 'form' => true, 'form_attributes' => array(), 'return' => add_query_arg('updated', 'true', $url), 'html_before_fields' => '', 'html_after_fields' => '', 'submit_value' => __("Update", 'acf'), 'updated_message' => __("Post updated", 'acf'), 'label_placement' => 'top', 'instruction_placement' => 'label', 'field_el' => 'div', 'uploader' => 'wp'));
    $args['form_attributes'] = wp_parse_args($args['form_attributes'], array('id' => 'post', 'class' => '', 'action' => '', 'method' => 'post'));
    // filter post_id
    $args['post_id'] = acf_get_valid_post_id($args['post_id']);
    // load values from this post
    $post_id = $args['post_id'];
    // new post?
    if ($post_id == 'new_post') {
        // dont load values
        $post_id = false;
        // new post defaults
        $args['new_post'] = acf_parse_args($args['new_post'], array('post_type' => 'post', 'post_status' => 'draft'));
    }
    // attributes
    $args['form_attributes']['class'] .= ' acf-form';
    // vars
    $field_groups = array();
    $fields = array();
    // post_title
    if ($args['post_title']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_title', 'label' => 'Title', 'type' => 'text', 'value' => $post_id ? get_post_field('post_title', $post_id) : '', 'required' => true));
    }
    // post_content
    if ($args['post_content']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_content', 'label' => 'Content', 'type' => 'wysiwyg', 'value' => $post_id ? get_post_field('post_content', $post_id) : ''));
    }
    // specific fields
    if ($args['fields']) {
        foreach ($args['fields'] as $selector) {
            // append field ($strict = false to allow for better compatibility with field names)
            $fields[] = acf_maybe_get_field($selector, $post_id, false);
        }
    } elseif ($args['field_groups']) {
        foreach ($args['field_groups'] as $selector) {
            $field_groups[] = acf_get_field_group($selector);
        }
    } elseif ($args['post_id'] == 'new_post') {
        $field_groups = acf_get_field_groups(array('post_type' => $args['new_post']['post_type']));
    } else {
        $field_groups = acf_get_field_groups(array('post_id' => $args['post_id']));
    }
    //load fields based on field groups
    if (!empty($field_groups)) {
        foreach ($field_groups as $field_group) {
            $field_group_fields = acf_get_fields($field_group);
            if (!empty($field_group_fields)) {
                foreach (array_keys($field_group_fields) as $i) {
                    $fields[] = acf_extract_var($field_group_fields, $i);
                }
            }
        }
    }
    // updated message
    if (!empty($_GET['updated']) && $args['updated_message']) {
        echo '<div id="message" class="updated"><p>' . $args['updated_message'] . '</p></div>';
    }
    // uploader (always set incase of multiple forms on the page)
    acf_update_setting('uploader', $args['uploader']);
    // display form
    if ($args['form']) {
        ?>

	
	<form <?php 
        acf_esc_attr_e($args['form_attributes']);
        ?>
>
	
	<?php 
    }
    // render post data
    acf_form_data(array('post_id' => $args['post_id'], 'nonce' => 'acf_form'));
    ?>

	<div class="acf-hidden">
		<?php 
    acf_hidden_input(array('name' => '_acf_form', 'value' => base64_encode(json_encode($args))));
    ?>

	</div>
	<div class="acf-fields acf-form-fields -<?php 
    echo $args['label_placement'];
    ?>
">
	
		<?php 
    // html before fields
    echo $args['html_before_fields'];
    // render
    acf_render_fields($post_id, $fields, $args['field_el'], $args['instruction_placement']);
    // html after fields
    echo $args['html_after_fields'];
    ?>

	
	</div><!-- acf-form-fields -->
	<?php 
    if ($args['form']) {
        ?>

	
	<!-- Submit -->
	<div class="acf-form-submit">
	
		<input type="submit" class="button button-primary button-large" value="<?php 
        echo $args['submit_value'];
        ?>
" />
		<span class="acf-spinner"></span>
		
	</div>
	<!-- / Submit -->
	
	</form>
	<?php 
    }
}
Esempio n. 3
0
// extract
extract($args);
?>
<div class="wrap acf-settings-wrap">
	
	<h2><?php 
echo $page['page_title'];
?>
</h2>
	
	<form id="post" method="post" name="post">
		
		<?php 
// render post data
acf_form_data(array('post_id' => 'options', 'nonce' => 'options'));
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
?>
		
		<div id="poststuff">
			
			<div id="post-body" class="metabox-holder columns-<?php 
echo 1 == get_current_screen()->get_columns() ? '1' : '2';
?>
">
				
				<div id="postbox-container-1" class="postbox-container">
					
					<?php 
do_meta_boxes('acf_options_page', 'side', null);
Esempio n. 4
0
        function edit_term($term, $taxonomy)
        {
            // vars
            $post_id = "{$taxonomy}_{$term->term_id}";
            $args = array('taxonomy' => $taxonomy);
            // update vars
            $this->form = '#edittag';
            // get field groups
            $field_groups = acf_get_field_groups($args);
            // render
            if (!empty($field_groups)) {
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'taxonomy'));
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    ?>
				<?php 
                    if ($field_group['style'] == 'default') {
                        ?>
					<h3><?php 
                        echo $field_group['title'];
                        ?>
</h3>
				<?php 
                    }
                    ?>
				<table class="form-table">
					<tbody>
						<?php 
                    acf_render_fields($post_id, $fields, 'tr', 'field');
                    ?>
					</tbody>
				</table>
				<?php 
                }
            }
        }
Esempio n. 5
0
        function edit_attachment($form_fields, $post)
        {
            // vars
            $el = 'tr';
            $post_id = $post->ID;
            $args = array('attachment' => 'All');
            // $el
            if ($this->validate_page()) {
                //$el = 'div';
            }
            // get field groups
            $field_groups = acf_get_field_groups($args);
            // render
            if (!empty($field_groups)) {
                // get acf_form_data
                ob_start();
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'attachment'));
                if ($this->validate_page()) {
                    echo '<style type="text/css">
					.compat-attachment-fields,
					.compat-attachment-fields > tbody,
					.compat-attachment-fields > tbody > tr,
					.compat-attachment-fields > tbody > tr > th,
					.compat-attachment-fields > tbody > tr > td {
						display: block;
					}
					tr.acf-field {
						display: block;
						margin: 0 0 13px;
					}
					tr.acf-field td.acf-label {
						display: block;
						margin: 0;
					}
					tr.acf-field td.acf-input {
						display: block;
						margin: 0;
					}
				</style>';
                }
                // $el
                //if( $el == 'tr' ) {
                echo '</td></tr>';
                //}
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    acf_render_fields($post_id, $fields, $el, 'field');
                }
                // $el
                //if( $el == 'tr' ) {
                echo '<tr class="compat-field-acf-blank"><td>';
                //}
                $html = ob_get_contents();
                ob_end_clean();
                $form_fields['acf-form-data'] = array('label' => '', 'input' => 'html', 'html' => $html);
            }
            // return
            return $form_fields;
        }
Esempio n. 6
0
        function add_comment()
        {
            // vars
            $post_id = "comment_0";
            // get field groups
            $field_groups = acf_get_field_groups(array('comment' => 'new'));
            if (!empty($field_groups)) {
                // render post data
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'comment'));
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    ?>
				<table class="form-table">
					<tbody>
						<?php 
                    acf_render_fields($post_id, $fields, 'tr', 'field');
                    ?>
					</tbody>
				</table>
				<?php 
                }
            }
        }
Esempio n. 7
0
 function edit_form_after_title()
 {
     // globals
     global $post, $wp_meta_boxes;
     // render post data
     acf_form_data(array('post_id' => $this->post_id, 'nonce' => 'post', 'ajax' => 1));
     // render
     do_meta_boxes(get_current_screen(), 'acf_after_title', $post);
     // clean up
     unset($wp_meta_boxes['post']['acf_after_title']);
 }
Esempio n. 8
0
 function edit_form_after_editor()
 {
     // render post data
     acf_form_data(array('post_id' => $this->post_id, 'nonce' => 'post', 'ajax' => 1));
 }
Esempio n. 9
0
 function render($user_id, $user_form, $el = 'tr')
 {
     // vars
     $post_id = "user_{$user_id}";
     $show_title = true;
     // show title
     if ($user_form === 'register') {
         $show_title = false;
     }
     // args
     $args = array('user_id' => 'new', 'user_form' => $user_form);
     if ($user_id) {
         $args['user_id'] = $user_id;
     }
     // get field groups
     $field_groups = acf_get_field_groups($args);
     // bail early if no field groups
     if (empty($field_groups)) {
         return;
     }
     // form data
     acf_form_data(array('post_id' => $post_id, 'nonce' => 'user'));
     // loop
     foreach ($field_groups as $field_group) {
         // vars
         $fields = acf_get_fields($field_group);
         // title
         if ($show_title && $field_group['style'] === 'default') {
             echo '<h2>' . $field_group['title'] . '</h2>';
         }
         // table start
         if ($el == 'tr') {
             echo '<table class="form-table"><tbody>';
         }
         // render fields
         acf_render_fields($post_id, $fields, $el, $field_group['instruction_placement']);
         // table end
         if ($el == 'tr') {
             echo '</tbody></table>';
         }
     }
 }
Esempio n. 10
0
        function render($user_id, $user_form, $el = 'tr')
        {
            // vars
            $post_id = "user_{$user_id}";
            $show_title = true;
            // show title
            if ($user_form == 'register') {
                $show_title = false;
            }
            // args
            $args = array('user_id' => 'new', 'user_form' => $user_form);
            if ($user_id) {
                $args['user_id'] = $user_id;
            }
            // get field groups
            $field_groups = acf_get_field_groups($args);
            // render
            if (!empty($field_groups)) {
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'user'));
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    ?>
				<?php 
                    if ($show_title && $field_group['style'] == 'default') {
                        ?>
					<h3><?php 
                        echo $field_group['title'];
                        ?>
</h3>
				<?php 
                    }
                    ?>
				
				<?php 
                    if ($el == 'tr') {
                        ?>
					<table class="form-table">
						<tbody>
				<?php 
                    }
                    ?>
				
					<?php 
                    acf_render_fields($post_id, $fields, $el, 'field');
                    ?>
				
				<?php 
                    if ($el == 'tr') {
                        ?>
						</tbody>
					</table>
				<?php 
                    }
                    ?>
				<?php 
                }
            }
        }
Esempio n. 11
0
function acf_form($args = array())
{
    // vars
    $url = acf_get_current_url();
    // defaults
    $args = wp_parse_args($args, array('id' => 'acf-form', 'post_id' => false, 'new_post' => false, 'field_groups' => false, 'fields' => false, 'post_title' => false, 'post_content' => false, 'form' => true, 'form_attributes' => array(), 'return' => add_query_arg('updated', 'true', $url), 'html_before_fields' => '', 'html_after_fields' => '', 'submit_value' => __("Update", 'acf'), 'updated_message' => __("Post updated", 'acf'), 'label_placement' => 'top', 'instruction_placement' => 'label', 'field_el' => 'div'));
    $args['form_attributes'] = wp_parse_args($args['form_attributes'], array('id' => 'post', 'class' => '', 'action' => '', 'method' => 'post'));
    // filter post_id
    $args['post_id'] = acf_get_valid_post_id($args['post_id']);
    // load values from this post
    $post_id = $args['post_id'];
    // new post?
    if ($post_id == 'new_post') {
        // dont load values
        $post_id = false;
        // new post defaults
        $args['new_post'] = acf_parse_args($args['new_post'], array('post_type' => 'post', 'post_status' => 'draft'));
    }
    // attributes
    $args['form_attributes']['class'] .= ' acf-form';
    // vars
    $field_groups = array();
    $fields = array();
    // post_title
    if ($args['post_title']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_title', 'label' => 'Title', 'type' => 'text', 'value' => $post_id ? get_post_field('post_title', $post_id) : '', 'required' => true));
    }
    // post_content
    if ($args['post_content']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_content', 'label' => 'Content', 'type' => 'wysiwyg', 'value' => $post_id ? get_post_field('post_content', $post_id) : ''));
    }
    // specific fields
    if (!empty($args['fields'])) {
        foreach ($args['fields'] as $selector) {
            $fields[] = get_field_object($selector, $post_id, false, false);
        }
    } elseif (!empty($args['field_groups'])) {
        foreach ($args['field_groups'] as $selector) {
            $field_groups[] = acf_get_field_group($selector);
        }
    } elseif ($args['post_id'] == 'new_post') {
        $field_groups = acf_get_field_groups(array('post_type' => $args['new_post']['post_type']));
    } else {
        $field_groups = acf_get_field_groups(array('post_id' => $args['post_id']));
    }
    //load fields based on field groups
    if (!empty($field_groups)) {
        foreach ($field_groups as $field_group) {
            $field_group_fields = acf_get_fields($field_group);
            if (!empty($field_group_fields)) {
                foreach (array_keys($field_group_fields) as $i) {
                    $fields[] = acf_extract_var($field_group_fields, $i);
                }
            }
        }
    }
    // updated message
    if (!empty($_GET['updated']) && $args['updated_message']) {
        echo '<div id="message" class="updated"><p>' . $args['updated_message'] . '</p></div>';
    }
    // display form
    if ($args['form']) {
        ?>
	
	<form <?php 
        acf_esc_attr_e($args['form_attributes']);
        ?>
>
	
	<?php 
    }
    // render post data
    acf_form_data(array('post_id' => $args['post_id'], 'nonce' => 'acf_form'));
    ?>
	<div class="acf-hidden">
		<?php 
    acf_hidden_input(array('name' => '_acf_form', 'value' => base64_encode(json_encode($args))));
    ?>
	</div>
	<div class="acf-fields acf-form-fields">
	
		<?php 
    // html before fields
    echo $args['html_before_fields'];
    // start table
    if ($args['label_placement'] == 'left') {
        $args['field_el'] = 'tr';
        ?>
<table class="acf-table"><tbody><?php 
    }
    acf_render_fields($post_id, $fields, $args['field_el'], $args['instruction_placement']);
    // end table
    if ($args['label_placement'] == 'left') {
        ?>
</tbody></table><?php 
    }
    // html after fields
    echo $args['html_after_fields'];
    ?>
	
	</div><!-- acf-form-fields -->
	<?php 
    if ($args['form']) {
        ?>
	
	<!-- Submit -->
	<div class="acf-form-submit">
	
		<input type="submit" class="button button-primary button-large" value="<?php 
        echo $args['submit_value'];
        ?>
" />
		<span class="acf-loading" style="display: none;"></span>
		
	</div>
	<!-- / Submit -->
	
	</form>
	<script type="text/javascript">
	(function($) {
		
		// vars
		var $spinner = $('#<?php 
        echo $args['form_attributes']['id'];
        ?>
 .acf-form-submit .acf-loading');
		
		
		// show spinner on submit
		$(document).on('submit', '#<?php 
        echo $args['form_attributes']['id'];
        ?>
', function(){
			
			// show spinner
			$spinner.css('display', 'inline-block');
			
		});
		
		
		// hide spinner after validation
		acf.add_filter('validation_complete', function( json, $form ){
			
			// hide spinner
			$spinner.css('display', 'none');
			
			
			// return
			return json;
					
		});
		
	})(jQuery);	
	</script>
	<?php 
    }
}
Esempio n. 12
0
 function edit_form_after_title()
 {
     // globals
     global $post;
     // render post data
     acf_form_data(array('post_id' => $post->post_id, 'nonce' => 'field_group', 'ajax' => 0));
 }
Esempio n. 13
0
 function comment_form_field_comment($html)
 {
     // global
     global $post;
     // vars
     $post_id = false;
     // get field groups
     $field_groups = acf_get_field_groups(array('comment' => $post->post_type));
     // bail early if no field groups
     if (!$field_groups) {
         return $html;
     }
     // ob
     ob_start();
     // render post data
     acf_form_data(array('post_id' => $post_id, 'nonce' => 'comment'));
     foreach ($field_groups as $field_group) {
         $fields = acf_get_fields($field_group);
         acf_render_fields($post_id, $fields, 'p', $field_group['instruction_placement']);
     }
     // append
     $html .= ob_get_contents();
     ob_end_clean();
     // return
     return $html;
 }
Esempio n. 14
0
        function add_comment()
        {
            // vars
            $post_id = "comment_0";
            // get field groups
            $field_groups = acf_get_field_groups(array('comment' => 'new'));
            if (!empty($field_groups)) {
                // render post data
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'comment'));
                foreach ($field_groups as $field_group) {
                    $fields = acf_get_fields($field_group);
                    ?>
				<div class="acf-fields -<?php 
                    echo $field_group['label_placement'];
                    ?>
">
					<?php 
                    acf_render_fields($post_id, $fields, 'div', $field_group['instruction_placement']);
                    ?>
				</div>
				<?php 
                }
            }
        }
Esempio n. 15
0
function acf_form($args = array())
{
    // vars
    $url = home_url($_SERVER['REQUEST_URI']);
    // defaults
    $args = wp_parse_args($args, array('id' => 'acf-form', 'post_id' => false, 'new_post' => false, 'field_groups' => false, 'fields' => false, 'post_title' => false, 'post_content' => false, 'form' => true, 'form_attributes' => array(), 'return' => add_query_arg('updated', 'true', $url), 'html_before_fields' => '', 'html_after_fields' => '', 'submit_value' => __("Update", 'acf'), 'updated_message' => __("Post updated", 'acf'), 'label_placement' => 'top', 'instruction_placement' => 'label', 'field_el' => 'div'));
    $args['form_attributes'] = wp_parse_args($args['form_attributes'], array('id' => 'post', 'class' => '', 'action' => '', 'method' => 'post'));
    // filter post_id
    $args['post_id'] = acf_get_valid_post_id($args['post_id']);
    // load values from this post
    $post_id = $args['post_id'];
    // new post?
    if ($post_id == 'new_post') {
        // dont load values
        $post_id = false;
        // new post defaults
        $args['new_post'] = acf_parse_args($args['new_post'], array('post_type' => 'post', 'post_status' => 'draft'));
    }
    // attributes
    $args['form_attributes']['class'] .= ' acf-form';
    // vars
    $field_groups = array();
    $fields = array();
    // post_title
    if ($args['post_title']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_title', 'label' => 'Title', 'type' => 'text', 'value' => $post_id ? get_post_field('post_title', $post_id) : '', 'required' => true));
    }
    // post_content
    if ($args['post_content']) {
        $fields[] = acf_get_valid_field(array('name' => '_post_content', 'label' => 'Content', 'type' => 'wysiwyg', 'value' => $post_id ? get_post_field('post_content', $post_id) : ''));
    }
    // specific fields
    if (!empty($args['fields'])) {
        foreach ($args['fields'] as $selector) {
            $fields[] = acf_get_field($selector);
        }
    } elseif (!empty($args['field_groups'])) {
        foreach ($args['field_groups'] as $selector) {
            $field_groups[] = acf_get_field_group($selector);
        }
    } elseif ($args['post_id'] == 'new_post') {
        $field_groups = acf_get_field_groups(array('post_type' => $args['new_post']['post_type']));
    } else {
        $field_groups = acf_get_field_groups(array('post_id' => $args['post_id']));
    }
    //load fields based on field groups
    if (!empty($field_groups)) {
        foreach ($field_groups as $field_group) {
            $fields = array_merge($fields, acf_get_fields($field_group));
        }
    }
    // updated message
    if (!empty($_GET['updated']) && $args['updated_message']) {
        echo '<div id="message" class="updated"><p>' . $args['updated_message'] . '</p></div>';
    }
    // display form
    if ($args['form']) {
        ?>
	
	<form <?php 
        acf_esc_attr_e($args['form_attributes']);
        ?>
>
	
	<?php 
    }
    // render post data
    acf_form_data(array('post_id' => $args['post_id'], 'nonce' => 'acf_form'));
    ?>
	<div class="acf-hidden">
		
		<?php 
    acf_hidden_input(array('name' => '_acf_form', 'value' => base64_encode(json_encode($args))));
    ?>
			
	</div>
	
	<div class="acf-form-fields">
	
		<?php 
    // html before fields
    echo $args['html_before_fields'];
    // start table
    if ($args['label_placement'] == 'left') {
        $args['field_el'] = 'tr';
        ?>
<table class="acf-table"><tbody><?php 
    }
    acf_render_fields($post_id, $fields, $args['field_el'], $args['instruction_placement']);
    // end table
    if ($args['label_placement'] == 'left') {
        ?>
</tbody></table><?php 
    }
    // html after fields
    echo $args['html_after_fields'];
    ?>
	
	</div><!-- acf-form-fields -->
	
	<?php 
    if ($args['form']) {
        ?>
	
	<!-- Submit -->
	<div class="acf-form-submit">
	
		<input type="submit" class="button button-primary button-large" value="<?php 
        echo $args['submit_value'];
        ?>
" />
		
	</div>
	<!-- / Submit -->
	
	</form>
	
	<?php 
    }
}
Esempio n. 16
0
        function edit_attachment($form_fields, $post)
        {
            // vars
            $is_page = $this->validate_page();
            $post_id = $post->ID;
            $el = 'tr';
            $args = array('attachment' => $post_id);
            // get field groups
            $field_groups = acf_get_field_groups($args);
            // render
            if (!empty($field_groups)) {
                // get acf_form_data
                ob_start();
                acf_form_data(array('post_id' => $post_id, 'nonce' => 'attachment'));
                if ($this->validate_page()) {
                    echo '<style type="text/css">
					
					.compat-attachment-fields,
					.compat-attachment-fields > tbody,
					.compat-attachment-fields > tbody > tr,
					.compat-attachment-fields > tbody > tr > th,
					.compat-attachment-fields > tbody > tr > td {
						display: block;
					}
					
					.compat-attachment-fields > tbody > tr.acf-field {
						margin: 0 0 15px;
					}
					
					.compat-attachment-fields > tbody > tr.acf-field > td.acf-label {
						margin: 0;
					}
					
					.compat-attachment-fields > tbody > tr.acf-field > td.acf-label label {
						margin: 0;
						padding: 0;
					}
					
					.compat-attachment-fields > tbody > tr.acf-field > td.acf-label p {
						margin: 0 0 3px !important;
					}
					
					.compat-attachment-fields > tbody > tr.acf-field > td.acf-input {
						margin: 0;
					}
					
				</style>';
                }
                // open
                echo '</td></tr>';
                // loop
                foreach ($field_groups as $field_group) {
                    // load fields
                    $fields = acf_get_fields($field_group);
                    // override instruction placement for modal
                    if (!$is_page) {
                        $field_group['instruction_placement'] = 'field';
                    }
                    // render
                    acf_render_fields($post_id, $fields, $el, $field_group['instruction_placement']);
                }
                // close
                echo '<tr class="compat-field-acf-blank"><td>';
                $html = ob_get_contents();
                ob_end_clean();
                $form_fields['acf-form-data'] = array('label' => '', 'input' => 'html', 'html' => $html);
            }
            // return
            return $form_fields;
        }