diff --git a/components/markup.inc b/components/markup.inc index 9bb628b..522fba2 100644 --- a/components/markup.inc +++ b/components/markup.inc @@ -23,6 +23,18 @@ function _webform_defaults_markup() { } /** + * Implements _webform_theme_component(). + */ +function _webform_theme_markup() { + return array( + 'webform_display_markup' => array( + 'render element' => 'element', + 'file' => 'components/markup.inc', + ), + ); +} + +/** * Implements _webform_edit_component(). */ function _webform_edit_markup($component) { @@ -76,5 +88,22 @@ function _webform_render_markup($component, $value = NULL, $filter = TRUE) { * Implements _webform_display_component(). */ function _webform_display_markup($component, $value, $format = 'html') { - return array(); + $node = isset($component['nid']) ? node_load($component['nid']) : NULL; + + return array( + '#weight' => $component['weight'], + '#theme' => 'webform_display_markup', + '#format' => $format, + '#value' => _webform_filter_values(check_markup($component['value'], $component['extra']['format'], '', TRUE), $node, NULL, NULL, FALSE), + '#translatable' => array('title'), + ); +} + +/** + * Format the output of data for this component. + */ +function theme_webform_display_markup($variables) { + // Markup components are not displayed but can be by overriding this theme + // function. + return ''; }