based on a customer name user can check the delivery radio button but if there is no customer delivery radio button should not be checked another radio button pickup is there should be checked in that condition.
what i am doing is working fine but radio button is not coming checked .. can anyone help me on that. here is my code
<div class="form-row-redio-btn">
<div class="LevelDiv" style="padding: 5px 15px;">Shipment Type</div>
<input type="radio" data-ng-value="true" id="radioOne" data-ng-model="IsPickup" name="account" checked data-ng-checked="IsPickup"/>
<label for="radioOne" class="radio">Pick up</label>
<input type="radio" data-ng-value="false" id="radioTwo" name="account" data-ng-model="IsPickup" data-ng-change="checkCustomer();"/>
<label for="radioTwo" class="radio">Delivery</label>
</div>
js
//check if the customer is selected or not.
$scope.checkCustomer = function () {
if (!$scope.CustomerName) {
toastr.clear();
$scope.IsPickup = true;
console.log($scope.IsPickup);
toastr["error"]('Please select a customer as the shipment type is delivery!');
return false;
}
}