function matrix_field_settings_form_text in Matrix field 8.2
Same name and namespace in other branches
- 7.2 matrix.admin.inc \matrix_field_settings_form_text()
Settings for for the text matrix
1 call to matrix_field_settings_form_text()
- matrix_field_settings_form in ./
matrix.module - Implements hook_field_settings_form().
File
- ./
matrix.admin.inc, line 12 - Configuration pages for matrix field
Code
function matrix_field_settings_form_text($field, $instance, $has_data) {
$settings = (array) $field['settings'];
$form['rows_count'] = array(
'#type' => 'textfield',
'#title' => t('Number of rows'),
'#description' => t('The number of rows to display in the grid.'),
'#required' => TRUE,
'#size' => 3,
'#default_value' => $settings['rows_count'],
);
$form['cols_count'] = array(
'#type' => 'textfield',
'#title' => t('Number of columns'),
'#default_value' => $settings['cols_count'],
'#description' => t('The number of columns to display in the grid.'),
'#required' => TRUE,
'#size' => 3,
);
$form['size'] = array(
'#type' => 'textfield',
'#size' => 5,
'#title' => t('Size of textfields'),
'#default_value' => $settings['size'],
);
$form['spreadsheet_style'] = array(
'#type' => 'checkbox',
'#title' => t('Spreadsheet style'),
'#description' => t('If selected columns will be labeld with A, B, C and rows with 1, 2, 3'),
'#default_value' => $settings['spreadsheet_style'],
);
return $form;
}