function matrix_settings_preview in Matrix field 6.2
Build a preview of the element
Parameters
$field_name string The name of the CCK field:
$rows_elements string Serialized array of rows data:
$cols_elements string Serialized array of cols data:
Return value
$form_element
3 string references to 'matrix_settings_preview'
- matrix_field_settings in ./
matrix.module - Implementation of hook_field_settings().
- matrix_settings_reorder_save in ./
admin.inc - @file Provides functions used in the creation of matrix fields.
- matrix_settings_throbber_save in ./
admin.inc - AJAX callback for saving an individual element Takes parameters from $_REQUEST Saves the data into the Drupal cache Echos JSON data which contains: serialized data (which is what will be eventually saved into the database) list of elements for row/column
File
- ./
matrix.module, line 237 - Defines simple matrix field types.
Code
function matrix_settings_preview($form_state, $field_name, $mode, $rows_elements, $cols_elements) {
$form['matrix_preview'] = array(
'#type' => 'matrix',
'#title' => t('Preview'),
'#description' => t('Preview of the matrix field'),
'#rows_elements' => $rows_elements,
'#cols_elements' => $cols_elements,
'#mode' => $mode,
);
return $form;
}