Problem/Motivation

The Tablefield module currently does not allow administrators to configure default text output when a cell in a table is left empty by the user. This lack of functionality results in blank cells in the table, which can be problematic for content presentation and user experience.

Steps to reproduce

  1. Install the Tablefield module and create a table field.
  2. Use the TableField as editor on some field, to enter content into some cells of the table.
  3. Leave some cells empty while creating content.
  4. Save the content.
  5. Observe that the empty cells appear blank on the front-end.

Proposed resolution

A patch has been developed to allow administrators to configure default text output for empty cells in a Tablefield. The configuration can be done through the TablefieldFormatter settings, where administrators can specify a default value that will be displayed when a table cell is left empty. This default content will appear on the front-end instead of the cell being empty.

User interface changes

The TablefieldFormatter settings page will include a new option where the administrator can specify the default text to be displayed in empty cells. This option will be presented as a text area field with a description of how it functions.

CommentFileSizeAuthor
#4 table-field-3509199-test-sample.png26.49 KBkaravkars

Issue fork tablefield-3509199

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tobas1996 created an issue. See original summary.

tobas1996’s picture

Issue summary: View changes
karavkars’s picture

StatusFileSize
new26.49 KB

Hello @tobas1996,
Tested your MR locally by applying tableFormatter settings works as expected.
attached snapshot too for reference.
Thank you.

karavkars’s picture

Status: Active » Reviewed & tested by the community

liam morland made their first commit to this issue’s fork.