<form class="row g-3 auto-width" action="{{ route('e-mail-apis.update', $api->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('patch')
    <!--Host -->
    <div class="col-md-12">
        <label for="host" class="form-label">Host <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="host" name="host" aria-describedby="inputGroupPrepend" required placeholder="Host" value="{{$api->host}}">
        <span class="text-danger error_host" style="display: none;">This field is required.</span>
    </div>
    <!--User Name -->
    <div class="col-md-6">
        <label for="user_name" class="form-label">User Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="user_name" name="user_name" aria-describedby="inputGroupPrepend" required placeholder="User Name" value="{{$api->user_name}}">
        <span class="text-danger error_user_name" style="display: none;">This field is required.</span>
    </div>
    <!--form_name -->
    <div class="col-md-6">
        <label for="form_name" class="form-label">Form Name</label> <span class="text-danger"><b>*</b></span>
        <input type="text" class="form-control" id="form_name" name="form_name" aria-describedby="inputGroupPrepend" required placeholder="Form Name" value="{{$api->form_name}}">
        <span class="text-danger error_form_name" style="display: none;">This field is required.</span>
    </div>
    <!--form_email -->
    <div class="col-md-6">
        <label for="form_email" class="form-label">Form Email</label> <span class="text-danger"><b>*</b></span>
        <input type="text" class="form-control" id="form_email" name="form_email" aria-describedby="inputGroupPrepend" required placeholder="Form Email" value="{{$api->form_email}}">
    </div>
      <!--Api type -->
    <div class="col-md-6">
        <label for="api_type" class="form-label">API Type <span class="text-danger"><b>*</b></span></label>
        <select class="form-select" aria-label="api_type" name="api_type">
            <option value="Sandbox" {{ matchSelected($api->api_type,'Sandbox') }}>Sandbox</option>
            <option value="Live" {{ matchSelected($api->api_type,'Live') }}>Live</option>
        </select>
        <span class="text-danger error_api_type" style="display:none;">This field is required.</span>
    </div>
</form>