Title: Table block
Last modified: August 21, 2016

---

# Table block

 *  Resolved [shiftless](https://wordpress.org/support/users/shiftless/)
 * (@shiftless)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/table-block/)
 * Hi,
 * I’m trying to add a custom Table block (columns, rows…). The defaults structure
   should be something like this:
 *     ```
       $defaults = array(
       	'title' => '',
       	'columns' => array(
       		1 => array(
       			'title' => 'Column 1 heading',
       			'rows' => array(
       				1 => array( 'content' => 'Row 1 content'),
       				2 => array( 'content' => 'Row 2 content'),
       				3 => array( 'content' => 'Row 3 content')
       			)
       		),
       		2 => array(
       			'title' => 'Column 2 heading',
       			'rows' => array(
       				1 => array( 'content' => 'Row 1 content'),
       				2 => array( 'content' => 'Row 2 content'),
       				3 => array( 'content' => 'Row 3 content')
       			)
       		)
       	)
       );
       ```
   
 * When I add the block into the builder, the default data are filled just fine.
   However, when I save the template, it seems like the rows data are not retained(
   the column title is there – working). I have text inputs for the rows and their
   id’s are this:
    `<?php echo $this->get_field_id('columns') ?>-<?php echo $column_count?
   >-rows-<?php echo $row_count ?>-content`
 * Is it possible to have this structure at all?
 * Thanks!
 * [http://wordpress.org/extend/plugins/aqua-page-builder/](http://wordpress.org/extend/plugins/aqua-page-builder/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [shiftless](https://wordpress.org/support/users/shiftless/)
 * (@shiftless)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/table-block/#post-3858578)
 * Figured it out, I had to set the name attribute to this:
    `name="<?php echo $
   this->get_field_name('columns') ?>[<?php echo $column_count ?>][rows][<?php echo
   $row_count ?>][content]"`

Viewing 1 replies (of 1 total)

The topic ‘Table block’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/aqua-page-builder_fafafa.svg)
 * [Aqua Page Builder](https://wordpress.org/plugins/aqua-page-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aqua-page-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aqua-page-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/aqua-page-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aqua-page-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aqua-page-builder/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [shiftless](https://wordpress.org/support/users/shiftless/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/table-block/#post-3858578)
 * Status: resolved