<form class="row g-3 auto-width" action="{{ route('bed-type.update', $bed_type->id)}}" method="post" enctype='multipart/form-data'
    id="source_form">
    @csrf
    @method("PATCH")
    <div class="col-md-12">
        <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="{{$bed_type->name}}">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
     <!-- product -->
    {{-- <div class="col-md-12">
        <label for="name" class="form-label">Product <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="product_id">
            @foreach ($products as $list)
                <option value="{{ $list->id }}" {{ $list->id == $bed_type->product_id ? 'selected':'' }}>{{ $list->name }}</option>
            @endforeach
        </select>
    </div> --}}
     <!-- product -->
     <div class="col-md-12">
        <div>
            <label class="form-label">Product</label>
        </div>
        <div class="input-group autocomplete">
            <input type="text" name="" id="product_id" class="product-select form-control" placeholder="Search Product" value="{!! $bed_type->getProduct->name ?? '' !!}">
            <ul class="searchResult"></ul>
            <input type="hidden" name="product_id" value="">
        </div>
        <span class="text-danger error_product_id" style="display:none;">This field is required.</span>
    </div>
</form>
