Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

state pull down


Guest

Recommended Posts

Posted

On the create account page there is a text feild to enter your state. if some info is missing and the continue button is clicked there is then a pull dowm menu to choose the state. How can I get the pull down to appear when the create account is first loaded?

  • 3 years later...
Posted

On the create account page there is a text feild to enter your state. if some info is missing and the continue button is clicked there is then a pull dowm menu to choose the state. How can I get the pull down to appear when the create account is first loaded?

 

 

Replace this code

$zones_array = array();

$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");

while ($zones_values = tep_db_fetch_array($zones_query)) {

$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

}

echo tep_draw_pull_down_menu('state', $zones_array);

 

with

 

if ($process == true) {

if ($entry_state_has_zones == true) {

$zones_array = array();

$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");

while ($zones_values = tep_db_fetch_array($zones_query)) {

$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

}

echo tep_draw_pull_down_menu('state', $zones_array);

} else {

echo tep_draw_input_field('state');

}

} else {

echo tep_draw_input_field('state');

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...