Привет! Что то валидация не работает
Форма:
<?php
function studio_sort_form() {
$countries = geo_get_countries();
$cities = geo_get_cities($_GET['country'], $_GET['city']);
$form['#id'] = 'local-sort-form';
$form['#method'] = 'get';
$form['region'] = array(
'#type' => 'fieldset',
'#title' => t('Region')
);
$form['region']['country'] = array(
'#type' =>'select',
'#title' => FALSE,
'#options' => $countries,
'#default_value' => $_GET['country'],
'#attributes' => array('class' => 'fl_l'),
'#theme' => 'geo_select',
'#weight' => 10
);
$form['region']['city'] = array(
'#type' => 'select',
'#title' => FALSE,
'#options' => !empty($node->city) ? $node->city : $cities,
'#default_value' => $_GET['city'],
'#theme' => 'geo_select',
'#weight' => 11
);
$form['region']['other'] = array(
'#type' => 'textfield',
'#id' => 'geo-city-all',
'#title' => FALSE,
'#value' => $_GET['other'],
'#default_value' => $_GET['other'],
'#theme' => 'geo_textfield',
'#weight' => 12
);
return $form;
}
Валидация:
<
code lang="php">
function studio_sort_validate($form, $form_state) {
print_r('Facking shit!');
}
?>
Комментарии
http://drupal.org/node/751826
Когда я ставлю $form['#method'] = get то валидация не работает Как так?