Correction/Follow-up to the above.
In field layout.php:
global $pagenow;
if($pagenow == "post-new.php") {
$state = 'open';
$display = 'block';
} elseif ($pagenow == "post.php") {
$state = 'closed';
$display = 'none';
}
Line #7:
<div class="layout" data-layout="<?php echo $layout['name']; ?>" data-toggle="<?php echo $state;?>">
Line #26:
<table class="widefat acf-input-table <?php if( $layout['display'] == 'row' ): ?>row_layout<?php endif; ?>" style="display:<?php echo $display;?>">
When adding new fields/rows, they become collapsed by default. Typically the user wants to edit right away. To alleviate this, I modified input.js as wel beginning around line #262:
(See lines notated with “+Added”)
// vars
var new_id = acf.helpers.uniqid(),
new_field_html = this.$el.find('> .clones > .layout[data-layout="' + layout + '"]').html().replace(/(=["]*[\w-\[\]]*?)(acfcloneindex)/g, '$1' + new_id),
// +Added data-toggle=open to prevent the need for double-click
new_field = $('<div class="layout" data-toggle="open" data-layout="' + layout + '"></div>').append( new_field_html );
// hide no values message
this.$el.children('.no_value_message').hide();
// +Added show_new_field function to alter the field we hid in field-layout.php
function show_new_field (new_field) {
new_field.find('.acf-input-table').css("display", "block").html;
return new_field;
}
// add row
if( $before )
{
// +Added show_new_field
$before.before( show_new_field(new_field) );
}
else
{
// +Added show_new_field
this.$values.append( show_new_field(new_field) );
}