ACF Table Field Pro Add-on Docs Last updated:

Since version: v1.8.0

Release Candidate 1.8.0-RC1

This page documents version 1.8.0, which is available as Release Candidate 1.8.0-RC1 for manual installation. The current public version is 1.7.6, automatic plugin updates still deliver that version.

Download the Release Candidate from your account (Download the plugin) and install it manually (Install the plugin). Details may still change until the final release.

Filter acf_tablefield/table_manager/enforce_field_limits

New since version 1.8.0

This filter is new.

This filter decides whether update_field() and update_sub_field() of the Table Manager check the field settings Min Rows, Max Rows, Min Columns and Max Columns when they save. The check is on by default, see Field limits. The filter runs on every save, so it can switch the check off for all saves, for one manager ID, one field or one post. The result is also passed to the filter acf_tablefield/table_manager/validate_save as enforce_field_limits of the context.

Parameters

add_filter( 'acf_tablefield/table_manager/enforce_field_limits', function( $enforce, $field, $post_id, $manager_id, $manager ) { 
 
	return $enforce; 
}, 10, 5 );
    • $enforce
    • (bool)
    • true checks the field limits, false switches the check off.

    • Defaults: true
    • $field
    • (array)
    • The ACF field array of the field that is saved.

    • $post_id
    • (mixed)
    • The post ID or the ACF variant for other objects, where the value is saved.

    • $manager_id
    • (string|null)
    • The manager ID set with set_options(), null if none is set. The abilities use acf_tablefield_abilities.

    • $manager
    • (object)
    • The Table Manager instance.

Example: off for all saves

add_filter( 'acf_tablefield/table_manager/enforce_field_limits', '__return_false' );

Example: off for the abilities

add_filter( 'acf_tablefield/table_manager/enforce_field_limits', function( $enforce, $field, $post_id, $manager_id ) { 
 
	if ( 'acf_tablefield_abilities' === $manager_id ) { 
		return false; 
	} 
 
	return $enforce; 
}, 10, 4 );

The abilities use the manager ID acf_tablefield_abilities.

Example: off for one field

add_filter( 'acf_tablefield/table_manager/enforce_field_limits', function( $enforce, $field ) { 
 
	if ( 'price_table' === $field['name'] ) { 
		return false; 
	} 
 
	return $enforce; 
}, 10, 2 );

Previous and Next Sources

Parent sources