function ad_select_adtype in Advertisement 7
Same name and namespace in other branches
- 6.3 ad.module \ad_select_adtype()
- 6.2 ad.module \ad_select_adtype()
Ad type switch submit handler.
File
- ./
ad.module, line 856
Code
function ad_select_adtype(&$form, &$form_state) {
if (!isset($form_state['values']['adtype']) && !isset($form_state['values']['adtype_select'])) {
form_set_error('adtype_select', t('Please, select an Ad type.'));
}
if (!isset($form_state['values']['adtype']) || isset($form_state['values']['adtype_select']) && $form_state['values']['adtype'] != $form_state['values']['adtype_select']) {
$form_state['values']['adtype'] = $form_state['values']['adtype_select'];
$form_state['rebuild'] = TRUE;
}
}