function sms_sendtophone_widget_settings in SMS Framework 6
Same name and namespace in other branches
- 5 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_widget_settings()
- 6.2 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_widget_settings()
- 7 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_widget_settings()
Implementation of hook_widget_settings().
File
- modules/
sms_sendtophone/ sms_sendtophone.module, line 244
Code
function sms_sendtophone_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$form['rows'] = array(
'#type' => 'textfield',
'#title' => t('Rows'),
'#default_value' => $widget['rows'] ? $widget['rows'] : 1,
'#required' => TRUE,
);
return $form;
case 'validate':
if (!is_numeric($widget['rows']) || intval($widget['rows']) != $widget['rows'] || $widget['rows'] <= 0) {
form_set_error('rows', t('"Rows" must be a positive integer.'));
}
break;
case 'save':
return array(
'rows',
);
}
}