Fix: change the content of states select if country is different
This commit is contained in:
parent
aa7eca2b87
commit
884e5eca1f
@ -122,7 +122,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
||||
$row_array['selectpays_id'] = $row['fk_country'];
|
||||
$row_array['departement_id'] = $row['fk_county'];
|
||||
|
||||
$row_array['countydata'] = $formcompany->select_state('',$row['fk_country'],'');
|
||||
$row_array['states'] = $formcompany->select_state('',$row['fk_country'],'');
|
||||
|
||||
array_push($return_arr,$row_array);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ function ajax_multiautocompleter($htmlname,$fields,$url,$option='')
|
||||
response( jQuery.map( data, function( item ) {
|
||||
if (data.length == 1) {
|
||||
jQuery("#'.$htmlname.'").val(item.value);
|
||||
if (item.countydata) {
|
||||
if (item.states) {
|
||||
jQuery("#departement_id").html(item.states);
|
||||
}
|
||||
for (i=0;i<length;i++) {
|
||||
@ -175,7 +175,7 @@ function ajax_multiautocompleter($htmlname,$fields,$url,$option='')
|
||||
});
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
if (ui.item.countydata) {
|
||||
if (ui.item.states) {
|
||||
jQuery("#departement_id").html(ui.item.states);
|
||||
}
|
||||
for (i=0;i<length;i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user