Since version: v1.8.0
Filter acf_tablefield/table_manager/enforce_field_limits
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 );
-
$enforcetruechecks the field limits,falseswitches the check off.-
Defaults:
true
-
$fieldThe ACF field array of the field that is saved.
-
$post_idThe post ID or the ACF variant for other objects, where the value is saved.
-
$manager_idThe manager ID set with
set_options(),nullif none is set. The abilities useacf_tablefield_abilities.
-
$managerThe 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 );