function cck_list_widget_settings in CCK List 6
Implementation of hook_widget_settings().
File
- ./
cck_list.module, line 186 - Defines a field type that outputs data in a list.
Code
function cck_list_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$rows = isset($widget['rows']) && is_numeric($widget['rows']) ? $widget['rows'] : 5;
$form['rows'] = array(
'#type' => 'textfield',
'#title' => t('Rows'),
'#default_value' => $rows,
'#element_validate' => array(
'_element_validate_integer_positive',
),
'#required' => TRUE,
);
return $form;
case 'save':
return array(
'rows',
);
}
}