Answer the question
In order to leave comments, you need to log in
How does setValueByObject() work in KLADR?
Good evening. Please tell me on the following question:
I substitute the name of the city in the field, you need to set all the data from the cladre to this field without user participation.
var $container_address = $('.checkout-address'),
$region = $container_address.find('#input-region'),
$city = $container_address.find('#input-city');
$region.kladr({
type: $.kladr.type.region,
verify: true
});
$city.kladr({
type: $.kladr.type.city,
parentInput: '#input-region',
limit: 7,
typeCode: $.kladr.typeCode.city + $.kladr.typeCode.settlement + $.kladr.typeCode.village,
verify: true
});
$region.kladr('controller').setValueByObject($region);
$city.kladr('controller').setValueByObject($city);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question