You are here

README.txt in TableField 7.3

Same filename and directory in other branches
  1. 6 README.txt
  2. 7 README.txt
  3. 7.2 README.txt
# TableField #

Provides a simple, generic form/widget to input tabular data. The form allows
the user to select the number of rows/columns in the table, then enter the data
via textfields. Since this is a field it is revision capable,multi-value
capable and has integration with Views.


## INSTALLATION ##

- Copy tablefield directory to ../sites/all/modules.
- Enable module at ../admin/modules.


## GET STARTED ##

Add a tablefield to any entity:
- For nodes at ../admin/structure/types. Then click 'manage fields' for the
  desired content type.
- For users at ../admin/config/people/accounts/fields.
- For taxonomies at ../admin/structure/taxonomy. Then click 'edit vocabulary'
  for the desired vocabulary.
- For files using the File Entity (fieldable files) module
  (https://www.drupal.org/project/file_entity) at
  ../admin/structure/file-types. Then click 'manage fields' for the desired
  file type.


## FEATURES ##

### Per table (in Edit mode) ###

- Change number of rows/columns per table (even within multi-value instances).
  Optionally restict that to users with the permission 'Rebuild tablefied'
  (see field settings below).
- Rows can be rearranged with drag and drop.
- Upload a CSV file to be converted into a table on the fly. The used
  separator can be defined at ../admin/config/content/tablefield.
- Copy paste tables e.g. from Excel.
- Add a table caption.
- Easily remove tables from a multi-value field with the button. Just install
  and enable https://www.drupal.org/project/multiple_fields_remove_button.


### Per field (field settings) ###

For nodes field settings for some of the below options can be found through
'manage fields' at ../admin/structure/types. For others entities see above.

- Restrict rebuilding to users with the permission "rebuild tablefield".
- Lock table header so default values cannot be changed.
- Input type: textfield or textarea.
- Maximum cell length in characters (integer >= 1, max 999999).
- Table cell processing (radios).
  * Plain text
  * Filtered text (user selects input format)
- Default value for example to create a header on new tables. Can be locked
  selecting the appropriate checkbox mentiond above.


### Per display mode (display settings) ###

For nodes display settings for the below options can be found through
'manage display' at ../admin/structure/types. For others entities see above
under 'GET STARTED'. Display options can be set per view mode e.g. 'Default' or
'Teaser'.

The options of all of the below settings are 'Yes'/'No' (checkbox) unless
stated otherwise.


#### Tabular view ####

- Sticky header
- Sortable (install and enable https://drupal.org/project/tablesorter)
- Hide first row
- Hide empty columns ignoring column header
- Trim empty trailing columns
- Trim empty trailing rows
- Hide empty rows
- Hide empty columns
- Show link to export table data as CSV depending on permission


#### Raw data (JSON or XML) ####

This format is intended to provide table data as a service:

- directly by enabling the Themeless module
  (https://www.drupal.org/project/themeless). It provides themeless output of a
  node's tablefield on the path 'node/%/themeless' (HTML, JSON or XML).
- using a View (e.g. with https://www.drupal.org/project/views_datasource) that
  outputs JSON or XML. The Views field settings includes 'Formatter'
- using a custom service (e.g. with https://www.drupal.org/project/services).


When choosing 'Raw data (JSON or XML)' it shows the below options:

- Wrapper for table data (if applicable)
  * tabledata (fixed string)
  * Label: [the actual field label]
  * Machine name: [the actual field machine name without field_ prefix]
  * To provide a custom value install and enable the 'Select (or other)'
    module (https://www.drupal.org/project/select_or_other).
- Use first row/column values as array keys (if not empty). (select)
  * No
  * Header only
  * Both first row and first column (two headers)
- Row identifier key
- Vertical header (first column instead of first row)
- Table data only (no caption)
- Encode numeric strings as numbers (for JSON only)
- XML instead of JSON
- How to make field values XML safe? (for XML only)
  * Convert special characters to HTML entities (htmlspecialchars)
  * Represent field values that contain special characters as a CDATA section
  * Represent all field values as a CDATA section

Using this format for a display mode for a node content type will display the
JSON or XML in pretty print. More logical is to use the regular 'Tabular view'
for the node display and use the 'Raw dat (JSON)' diplay only for a service.
That would expose the data of published tables on a site automatically as a
service.


### Themeless output ###

Themeless module https://www.drupal.org/project/themeless provides themeless
output of a node's tablefield on the path 'node/%/themeless' (HTML, JSON or
XML). This is useful to embed the table's HTML elsewhere (as an iFrame) or to
provide the table data as a service (JSON or XML) directly without the need of
Views or a Service.

- Enable the module Themeless.
- Go to ../admin/structure/types/manage/[your-content-type]/display.
- Uncollapse the CUSTOM DISPLAY SETTINGS and select 'Themeless'.
- Save.
- Now a new display mode appears besides Default and Teaser. Go and configure.
- Save.

## CREDITS ##

- Original author: Kevin Hankens (http://www.kevinhankens.com)
- Maintainer: vitalie (https://www.drupal.org/u/vitalie)
- Maintainer: jenlampton (https://www.drupal.org/u/jenlampton)
- Maintainer D7: Martin Postma (https://www.drupal.org/u/lolandese)

File

README.txt
View source
  1. # TableField #
  2. Provides a simple, generic form/widget to input tabular data. The form allows
  3. the user to select the number of rows/columns in the table, then enter the data
  4. via textfields. Since this is a field it is revision capable,multi-value
  5. capable and has integration with Views.
  6. ## INSTALLATION ##
  7. - Copy tablefield directory to ../sites/all/modules.
  8. - Enable module at ../admin/modules.
  9. ## GET STARTED ##
  10. Add a tablefield to any entity:
  11. - For nodes at ../admin/structure/types. Then click 'manage fields' for the
  12. desired content type.
  13. - For users at ../admin/config/people/accounts/fields.
  14. - For taxonomies at ../admin/structure/taxonomy. Then click 'edit vocabulary'
  15. for the desired vocabulary.
  16. - For files using the File Entity (fieldable files) module
  17. (https://www.drupal.org/project/file_entity) at
  18. ../admin/structure/file-types. Then click 'manage fields' for the desired
  19. file type.
  20. ## FEATURES ##
  21. ### Per table (in Edit mode) ###
  22. - Change number of rows/columns per table (even within multi-value instances).
  23. Optionally restict that to users with the permission 'Rebuild tablefied'
  24. (see field settings below).
  25. - Rows can be rearranged with drag and drop.
  26. - Upload a CSV file to be converted into a table on the fly. The used
  27. separator can be defined at ../admin/config/content/tablefield.
  28. - Copy paste tables e.g. from Excel.
  29. - Add a table caption.
  30. - Easily remove tables from a multi-value field with the button. Just install
  31. and enable https://www.drupal.org/project/multiple_fields_remove_button.
  32. ### Per field (field settings) ###
  33. For nodes field settings for some of the below options can be found through
  34. 'manage fields' at ../admin/structure/types. For others entities see above.
  35. - Restrict rebuilding to users with the permission "rebuild tablefield".
  36. - Lock table header so default values cannot be changed.
  37. - Input type: textfield or textarea.
  38. - Maximum cell length in characters (integer >= 1, max 999999).
  39. - Table cell processing (radios).
  40. * Plain text
  41. * Filtered text (user selects input format)
  42. - Default value for example to create a header on new tables. Can be locked
  43. selecting the appropriate checkbox mentiond above.
  44. ### Per display mode (display settings) ###
  45. For nodes display settings for the below options can be found through
  46. 'manage display' at ../admin/structure/types. For others entities see above
  47. under 'GET STARTED'. Display options can be set per view mode e.g. 'Default' or
  48. 'Teaser'.
  49. The options of all of the below settings are 'Yes'/'No' (checkbox) unless
  50. stated otherwise.
  51. #### Tabular view ####
  52. - Sticky header
  53. - Sortable (install and enable https://drupal.org/project/tablesorter)
  54. - Hide first row
  55. - Hide empty columns ignoring column header
  56. - Trim empty trailing columns
  57. - Trim empty trailing rows
  58. - Hide empty rows
  59. - Hide empty columns
  60. - Show link to export table data as CSV depending on permission
  61. #### Raw data (JSON or XML) ####
  62. This format is intended to provide table data as a service:
  63. - directly by enabling the Themeless module
  64. (https://www.drupal.org/project/themeless). It provides themeless output of a
  65. node's tablefield on the path 'node/%/themeless' (HTML, JSON or XML).
  66. - using a View (e.g. with https://www.drupal.org/project/views_datasource) that
  67. outputs JSON or XML. The Views field settings includes 'Formatter'
  68. - using a custom service (e.g. with https://www.drupal.org/project/services).
  69. When choosing 'Raw data (JSON or XML)' it shows the below options:
  70. - Wrapper for table data (if applicable)
  71. * tabledata (fixed string)
  72. * Label: [the actual field label]
  73. * Machine name: [the actual field machine name without field_ prefix]
  74. * To provide a custom value install and enable the 'Select (or other)'
  75. module (https://www.drupal.org/project/select_or_other).
  76. - Use first row/column values as array keys (if not empty). (select)
  77. * No
  78. * Header only
  79. * Both first row and first column (two headers)
  80. - Row identifier key
  81. - Vertical header (first column instead of first row)
  82. - Table data only (no caption)
  83. - Encode numeric strings as numbers (for JSON only)
  84. - XML instead of JSON
  85. - How to make field values XML safe? (for XML only)
  86. * Convert special characters to HTML entities (htmlspecialchars)
  87. * Represent field values that contain special characters as a CDATA section
  88. * Represent all field values as a CDATA section
  89. Using this format for a display mode for a node content type will display the
  90. JSON or XML in pretty print. More logical is to use the regular 'Tabular view'
  91. for the node display and use the 'Raw dat (JSON)' diplay only for a service.
  92. That would expose the data of published tables on a site automatically as a
  93. service.
  94. ### Themeless output ###
  95. Themeless module https://www.drupal.org/project/themeless provides themeless
  96. output of a node's tablefield on the path 'node/%/themeless' (HTML, JSON or
  97. XML). This is useful to embed the table's HTML elsewhere (as an iFrame) or to
  98. provide the table data as a service (JSON or XML) directly without the need of
  99. Views or a Service.
  100. - Enable the module Themeless.
  101. - Go to ../admin/structure/types/manage/[your-content-type]/display.
  102. - Uncollapse the CUSTOM DISPLAY SETTINGS and select 'Themeless'.
  103. - Save.
  104. - Now a new display mode appears besides Default and Teaser. Go and configure.
  105. - Save.
  106. ## CREDITS ##
  107. - Original author: Kevin Hankens (http://www.kevinhankens.com)
  108. - Maintainer: vitalie (https://www.drupal.org/u/vitalie)
  109. - Maintainer: jenlampton (https://www.drupal.org/u/jenlampton)
  110. - Maintainer D7: Martin Postma (https://www.drupal.org/u/lolandese)