<form class="row g-3 auto-width" action="{{ route('transportation-mode.update', $type->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('patch')
    <div class="col-md-6">
        <label for="name" class="form-label">Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="name" name="name" aria-describedby="inputGroupPrepend" required value="{{$type->name}}">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="code" class="form-label">Code</label>
        <input type="text" class="form-control" id="code" name="code" aria-describedby="inputGroupPrepend" required value="{{$type->code}}">
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="service_name" class="form-label">Service Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="service_name" name="service_name" aria-describedby="inputGroupPrepend" required value="{{$type->service_name}}">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
     <div class="col-md-6">
        <label for="code" class="form-label">Type</label>
        <input type="text" class="form-control" id="way_bill_type" name="way_bill_type" aria-describedby="inputGroupPrepend" required value="{{$type->way_bill_type}}">
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>
       <div class="col-md-6">
        <label for="sac_code" class="form-label">SAC Code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="sac_code" name="sac_code" aria-describedby="inputGroupPrepend" required value="{{$type->sac_code}}">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
      <div class="col-md-6">
        <label class="form-label">Tax Slab Name</label>
        <select class="form-control" id="tax_slab_id" name="tax_slab_id">
            <option value=" "> -Select- </option>
            @foreach($taxname as $list)
            <option value="{{ $list->id}}" {!! $type->tax_slab_id == $list->id ? 'selected' : '' !!}>{{$list->name}}</option>
            @endforeach
         </select>
    </div>
    <div class="col-md-6">
        <label for="priority" class="form-label">Priority</label>
        <input type="text" class="form-control" id="priority" name="priority" aria-describedby="inputGroupPrepend" required value="{{$type->priority}}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
   
</form>
<script type="text/javascript">
      $("#priority").on('input', function() {
          const onlyNumbers = $(this).val().replace(/[^0-9]/g, '');
          $("#priority").val(onlyNumbers);
      });
</script> 