diff options
author | Sashi20 | 2019-01-02 10:40:21 +0530 |
---|---|---|
committer | Sashi20 | 2019-01-02 10:40:21 +0530 |
commit | c3f0071e8267ea15768d61bce2753c8e443fd854 (patch) | |
tree | 4a0cf136307d7fdbe4e46b0a8c16ef61990032e0 | |
parent | 0a13c5e74fa29b3056fb63224e71dd79b3069ba3 (diff) | |
download | om_pssp-c3f0071e8267ea15768d61bce2753c8e443fd854.tar.gz om_pssp-c3f0071e8267ea15768d61bce2753c8e443fd854.tar.bz2 om_pssp-c3f0071e8267ea15768d61bce2753c8e443fd854.zip |
Populating country field other than India in manage proposal
-rwxr-xr-x | manage_proposal.inc | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index d8aba72..0a421f2 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -718,6 +718,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) '#required' => TRUE, '#default_value' => $proposal_data->university ); + if($proposal_data->country == 'India'){ $form['country'] = array( '#type' => 'select', '#title' => t('Country'), @@ -730,9 +731,38 @@ function om_pssp_proposal_edit_form($form, &$form_state) '#tree' => TRUE, '#validated' => TRUE ); + $form['all_state'] = array( + '#type' => 'select', + '#title' => t('State'), + '#options' => _df_list_of_states(), + '#default_value' => $proposal_data->state, + '#validated' => TRUE, + '#states' => array( + 'visible' => array( + ':input[name="country"]' => array( + 'value' => 'India' + ) + ) + ) + ); + $form['city'] = array( + '#type' => 'select', + '#title' => t('City'), + '#options' => _df_list_of_cities(), + '#default_value' => $proposal_data->city, + '#states' => array( + 'visible' => array( + ':input[name="country"]' => array( + 'value' => 'India' + ) + ) + ) + ); +} +else{ $form['other_country'] = array( '#type' => 'textfield', - '#title' => t('Other than India'), + '#title' => t('Country(Other than India)'), '#size' => 100, '#default_value' => $proposal_data->country, '#attributes' => array( @@ -748,7 +778,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) ); $form['other_state'] = array( '#type' => 'textfield', - '#title' => t('State other than India'), + '#title' => t('State(Other than India)'), '#size' => 100, '#attributes' => array( 'placeholder' => t('Enter your state/region name') @@ -764,7 +794,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) ); $form['other_city'] = array( '#type' => 'textfield', - '#title' => t('City other than India'), + '#title' => t('City(Other than India)'), '#size' => 100, '#attributes' => array( 'placeholder' => t('Enter your city name') @@ -778,33 +808,8 @@ function om_pssp_proposal_edit_form($form, &$form_state) ) ) ); - $form['all_state'] = array( - '#type' => 'select', - '#title' => t('State'), - '#options' => _df_list_of_states(), - '#default_value' => $proposal_data->state, - '#validated' => TRUE, - '#states' => array( - 'visible' => array( - ':input[name="country"]' => array( - 'value' => 'India' - ) - ) - ) - ); - $form['city'] = array( - '#type' => 'select', - '#title' => t('City'), - '#options' => _df_list_of_cities(), - '#default_value' => $proposal_data->city, - '#states' => array( - 'visible' => array( - ':input[name="country"]' => array( - 'value' => 'India' - ) - ) - ) - ); +} + $form['pincode'] = array( '#type' => 'textfield', '#title' => t('Pincode'), |