$country = new ps_country(); $dbc = $country->get_country_by_code($dbt->f($field->name)); $country_id = $dbt->f($field->name); //if ($dbc !== false) // echo $dbc->f('country_name'); $ps_html = new ps_html(); $onchange = "onchange=\"changeStateList();\""; $ps_html->list_country("country", $country_id, "id=\"country_field\" {$onchange}"); break; case 'state': $country = new ps_country(); $state = $dbt->f($field->name); $dbc = $country->get_state_by_code($state, $country_id); //if ($dbc !== false) // echo $dbc->f('state_name'); echo $ps_html->dynamic_state_lists("country", "state", $country_id, $state); break; default: $fieldvalue = $dbt->f($field->name); if (0) { echo " "; } else { echo '<input type="text" name="' . $field->name . '" value="' . htmlspecialchars($fieldvalue) . '" class="order_user_filed">'; } break; } ?> </td> </tr> <?php }