Closed (fixed)
Project:
TableField
Version:
7.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Apr 2014 at 09:39 UTC
Updated:
26 Feb 2017 at 20:14 UTC
Jump to comment: Most recent
How can this be done in drupal 7.
I have achieved to display the raw value of this tablefield in views - Global no results but not in the table format.
I have this in PHP-format in the Global - No results behaviour in views
$view = views_get_current_view();
$node = node_load( $view->args[0] );
$table = $node->field_modal_parameters_tabel[und][0]['value'];
print $table;
This gives me this.
a:34:{s:8:"cell_0_0";s:1:"N";s:8:"cell_0_1";s:21:"nat. freq. meas. [Hz]";s:8:"cell_0_2";s:22:"&xij";s:8:"cell_0_3";s:1:"N";s:8:"cell_0_4";s:21:"nat. freq. calc. [Hz]";s:8:"cell_0_5";s:17:"damping calc. [%]";s:8:"cell_0_6";s:7:"MAC [-]";s:8:"cell_0_7";s:11:"delta f ....
But how can I display the table format?
Comments
Comment #1
nimek commentedprint_r(unserialize($table));
It will return assocciative array.
Or even better
tablefield_rationalize_table($node->field_modal_parameters_tabel[und][0]['value']);
Comment #2
carlovdb commentedThat gives me the array, yes.
but
That gives me An AJAX HTTP error
:(
Comment #3
carlovdb commentedSolution thx to gaurav_varshney:
Comment #4
bleeuwen commentedHi
When you change:
Or even better
tablefield_rationalize_table($node->field_modal_parameters_tabel[und][0]['value']);
in:
Or even better
tablefield_rationalize_table(unserialize($node->field_modal_parameters_tabel[und][0]['value']));
It is OKE
Comment #5
lolandese commentedThis seems to be answered. Feel free to reopen if still help on this issue is needed using the latest version.