Closed ChaerilM closed 1 year ago
you can use serverParams: related key it should contain the id of the field that contains the related data i've improved this to also pass the value with the name of the related field i've also added a small update to the docs to explain this
tried with the name, didn't seems to work, or it's working but it took data from init while it was null instead of current
serverParams: {
province_id: $('[name="ads_province"]').val()
},
<div class="col-6">
<label class="form-label" for="ads_province">Province *</label>
<input class="form-control js-select-province" id="ads_province" name="ads_province" type="text" @required(true) placeholder="Province" autocomplete="off">
</div>
serverParams: {
related: 'province_id',
},
check the demo.html related field param (should) work fine. the value is updating properly
make sure your input has an id matching the value set in related
thanks, it finally works, and I have no idea why. perhaps because I updated the package. or something else.
i have this