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
- Install the Tablefield module and create a table field.
- Use the TableField as editor on some field, to enter content into some cells of the table.
- Leave some cells empty while creating content.
- Save the content.
- 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | table-field-3509199-test-sample.png | 26.49 KB | karavkars |
Issue fork tablefield-3509199
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
Comment #3
tobas1996 commentedComment #4
karavkars commentedHello @tobas1996,
Tested your MR locally by applying tableFormatter settings works as expected.
attached snapshot too for reference.
Thank you.
Comment #5
karavkars commented