ACF Table Field Pro Add-on Docs

Field Data

Please understand

You better not rely on the raw database table data structure as it may change in the future. There will be a table manager table_manager() to get, change and update table data.

A table fields data are stored in one serialized array in a post meta entry.

Example table

Here is an example of a simple table and the raw data stored in the database expressed as JSON.

A B
1 some
2 thing

Example table data as JSON

{ 
	"t":{ // table 
		"o":{ // table options 
			"ca":"", // caption 
			"ct":"ed", // content type 
			"tb":"basic", // toolbar for wysiwyg editor 
			"uh":"y", // use header 
			"uf":"n", // use footer 
			"sc":"n", // use stub column 
			"st":"", // styles 
			"cols":"2", // amount of columns 
			"rows":"3", // amount of columns 
			"changed":"true" // default table was changed 
		} 
	}, 
	"c":[ // columns options 
		{ // columns row 
			"c": [ // column cells 
				{ // column 
					"o":{} // column options 
				}, 
				{ 
					"o":{} 
				} 
			] 
		}, 
	], 
	"h":[ // table header 
		{ // header row 
			"c": [ // header cells 
				{ // a header cell 
					"c":"A",  // a header cell content 
					"o":{}  // a header cell options 
				}, 
				{ 
					"c":"B", 
					"o": {} 
				} 
			], 
			"o":{} // the header row options 
		}, 
	], 
	"b":[ // table body 
		{ // a table body row 
			"c": [ // a body row cells 
				{ 
					"c":"1", // a body cell content 
					"o":{} // a body cell options 
				}, 
				{ 
					"c":"some", 
					"o":{} 
				} 
			], 
			"o":{} // a body row options 
		}, 
		{ 
			"c": [ 
				{ 
					"c":"2", 
					"o":{} 
				}, 
				{ 
					"c":"thing", 
					"o":{} 
				} 
			], 
			"o":{} 
		} 
	], 
	"p":[ // parameters 
		"v": "1.0.0", // table field plugin version 
		"fk": "field_664dcdcdd4983", // field key 
		"fn": "table" // field name 
	], 
}

Depending on where the table field data is processed, it is a Javascript object or a PHP array.

Table Object

Table options structure

{ 
	"t":{ 
		"o":{ 
			"uh":"y" 
		} 
	} 
}

The object "t" stands for parameters of this table. This parameter object has an object "o" which stands for options.

Table options list

Name Decription Type Value Module
ca Table caption string caption
changed Whether the table content was edited boolean false/true main
uh Use header string y/n thead
uf Use footer string y/n tfoot
cols Amount of the table body colums integer cols_rows_limit
rows Amount of the table body rows integer cols_rows_limit
ct Content type of cells string st/ed cell_content_type
tb Toolbar for wysiwyg editor string full/basic editor
st Style string table_styles
sc Stub Column string n stub_column

Previous and Next Sources

Parent sources