summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xproposal.inc30
1 files changed, 16 insertions, 14 deletions
diff --git a/proposal.inc b/proposal.inc
index e4ea2b2..7e8eb8d 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -191,19 +191,20 @@ function om_pssp_proposal_form($form, &$form_state, $no_js_use = FALSE)
'value' => 'India'
)
)
- )
+ ),
);
$form['city'] = array(
- '#type' => 'select',
- '#title' => t('City'),
- '#options' => _df_list_of_cities(),
- '#states' => array(
- 'visible' => array(
- ':input[name="country"]' => array(
- 'value' => 'India'
- )
- )
- )
+ '#type' => 'select',
+ '#title' => t('City'),
+ '#options' => _df_list_of_cities(),
+ '#validated' => TRUE,
+ '#states' => array(
+ 'visible' => array(
+ ':input[name="country"]' => array(
+ 'value' => 'India'
+ )
+ )
+ ),
);
$form['pincode'] = array(
'#type' => 'textfield',
@@ -350,17 +351,17 @@ function om_pssp_proposal_form_validate($form, &$form_state)
} //$form_state['values']['country'] == 'Others'
else
{
- if ($form_state['values']['country'] == '')
+ if ($form_state['values']['country'] == '0')
{
form_set_error('country', t('Select country name'));
// $form_state['values']['country'] = $form_state['values']['other_country'];
} //$form_state['values']['country'] == ''
- if ($form_state['values']['all_state'] == '')
+ if ($form_state['values']['all_state'] == '0')
{
form_set_error('all_state', t('Select state name'));
// $form_state['values']['country'] = $form_state['values']['other_country'];
} //$form_state['values']['all_state'] == ''
- if ($form_state['values']['city'] == '')
+ if ($form_state['values']['city'] == '0')
{
form_set_error('city', t('Select city name'));
// $form_state['values']['country'] = $form_state['values']['other_country'];
@@ -601,3 +602,4 @@ function om_pssp_proposal_form_submit($form, &$form_state)
drupal_set_message(t('We have received your power systems simulation proposal. We will get back to you soon.'), 'status');
drupal_goto('powersystems');
}
+