<form class="row g-3 auto-width" method="post" action="{{ route('symptoms.update', $data->id) }}">
    @csrf
    @method('put')
    <div class="col-md-12">
        <label for="symptoms_title" class="form-label">Name<span class="text-danger"><b>*</b></span></label>
        <input type="text" value="{{ $data->symptoms_title }}" class="form-control symptoms_title" name="symptoms_title" aria-describedby="inputGroupPrepend">
    </div>

    <div class="col-md-12">
        <label for="code" class="form-label">Code</label>
        <input type="text" value="{{ $data->code }}" class="form-control code" name="code" aria-describedby="inputGroupPrepend">
    </div>

    <div class="col-md-12">
        <label for="type" class="form-label">Type</label>
        <select class="form-control symptoms_type" name="type">
            @foreach($symptom_types as $symptom_type)
                <option {{ ($data->type_id == $symptom_type->id) ? 'selected' : '' }} value="{{ $symptom_type->id }}">{{ $symptom_type->symptoms_type }}</option>
            @endforeach
        </select>
        <span class="text-danger error_symptoms_type" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="priority" class="form-label">Priority<span class="text-danger"><b></b></span></label>
        <input type="number" value="{{ $data->priority }}" class="form-control" name="priority" aria-describedby="inputGroupPrepend">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="description" class="form-label">Description</label>
        <textarea class="form-control" name="description" placeholder="Description">{{ $data->description }}</textarea>
    </div>
</form>