{{ __('messages.web_appointment.make_an_appointment') }}
{{ Form::radio('patient_type', '1', true, ['class' => 'form-check-input new-patient-radio', 'id' => 'newPatient1', 'checked']) }}
{{ Form::radio('patient_type', '2', false, ['class' => 'form-check-input old-patient-radio', 'id' => 'oldPatient1']) }}
{{ Form::text('patient_name', null, ['class' => 'form-control', 'id' => 'patientName', 'autocomplete' => 'off', 'required', 'disabled']) }}
{{ Form::hidden('patient_id', null, ['id' => 'patient']) }}
{{ Form::text('first_name', null, ['class' => 'form-control ', 'placeholder' => Lang::get('messages.web_appointment.enter_your_first_name'), 'autocomplete' => 'off', 'required', 'id' => 'firstName']) }}
{{ Form::text('last_name', null, ['class' => 'form-control', 'placeholder' => Lang::get('messages.web_appointment.enter_your_last_name'), 'autocomplete' => 'off', 'required', 'id' => 'lastName']) }}
{{ Form::email('email', null, ['class' => 'form-control old-patient-email', 'placeholder' => Lang::get('messages.web_contact.enter_your_email'), 'autocomplete' => 'off', 'required']) }}
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => Lang::get('messages.web_appointment.enter_your_password'), 'required', 'min' => '6', 'max' => '10', 'id' => 'password']) }}
{{ Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => Lang::get('messages.web_appointment.enter_confirm_password'), 'required', 'min' => '6', 'max' => '10', 'id' => 'confirmPassword']) }}
{{ Form::select('department_id', $departments, null, ['id' => 'webDepartmentId', 'placeholder' => Lang::get('messages.web_appointment.select_department')]) }}
{{ Form::hidden('doctors', isset(session()->get('data')['doctorId']) ? session()->get('data')['doctorId'] : null, ['id' => 'doctor']) }}
{{ Form::hidden('apdate', isset(session()->get('data')['appointmentDate']) ? session()->get('data')['appointmentDate'] : null, ['id' => 'appointmentDate']) }}
{{--
--}}
{{--
--}}
{{ Form::select('doctor_id', $doctors, isset(session()->get('data')['doctorId']) ? session()->get('data')['doctorId'] : null, ['autocomplete' => 'off', 'id' => 'appointmentDoctorId', 'placeholder' => __('messages.web_appointment.select_doctor')]) }}
{{ Form::text('opd_date', null, ['class' => 'form-control opdDate', 'autocomplete' => 'off', 'id' => 'opdDate', 'required']) }}
{{ Form::text('appointment_charge', null, ['class' => 'form-control' , 'placeholder' => __('messages.doctor.appointment_charge'), 'id' => 'appointmentCharge','readonly' => 'readonly']) }}
{{ Form::select('payment_mode', getAppointmentPaymentTypes(), null, ['class' => 'selectized appointmentPaymentMode','autocomplete' => 'off' ,'id'=> 'appointmentPaymentModeId', 'placeholder' => __('messages.ipd_payments.payment_mode')]) }}
{{ Form::textarea('problem', null, ['class' => 'form-control form-textarea', 'placeholder' => Lang::get('messages.web_appointment.enter_description'), 'autocomplete' => 'off', 'rows' => 4]) }}
@if (count($customField) >= 0)
@foreach ($customField as $field)
@php
$field_values = explode(',',$field['values']);
$dateType = ($field['field_type'] == 6) ? 'customFieldDate' : 'customFieldDateTime';
$field_type = \App\Models\AddCustomFields::FIELD_TYPE_ARR[$field['field_type']];
$fieldName = 'field'.$field['id'];
$fieldData = isset($appointment->custom_field[$fieldName]) ? $appointment->custom_field[$fieldName] : null;
@endphp
{{ Form::label($field['field_name'], $field['field_name'] . ':', ['class' => $field['is_required'] == 1 ? 'form-label dynamic-field' : 'form-label']) }}
@if ($field['is_required'] == 1)
*
@endif
@if ($field_type == 'date' || $field_type == 'date & Time')
{{ Form::text($fieldName, $fieldData, ['id'=>$dateType,'class' => ($field['is_required'] == 1) ? 'date-time form-control dynamic-field' : 'date-time bg-white form-control', 'autocomplete' => 'off','placeholder'=> $field['field_name'],$field['is_required'] == 1 ? 'required' : '','readolny' => 'readonly']) }}
@elseif ($field_type == 'toggle')
@elseif ($field_type == 'select')
{{ Form::select($fieldName, $field_values, isset($fieldData) ? $fieldData : null, ['class' => $field['is_required'] == 1 ? 'dynamic-field custom-field-select' : 'custom-field-select','id'=> 'customFieldSelect', 'placeholder' => $field['field_name']]) }}
@elseif ($field_type == 'multiSelect')
{{ Form::select($fieldName . '[]', $field_values, isset($fieldData) ? $fieldData : null, ['class' => $field['is_required'] == 1 ? 'appointment-multi-select dynamic-field custom-field-multi-select' : 'appointment-multi-select custom-field-multi-select','id'=> 'customFieldMultiSelect','multiple', 'placeholder' => $field['field_name']]) }}
@else
{{ Form::$field_type($fieldName, $fieldData, ['class' => $field['is_required'] == 1 ? 'form-control dynamic-field' : 'form-control', 'placeholder' => $field['field_name'],$field['is_required'] == 1 ? 'required' : '','rows' => $field_type == 'textarea' ? 4 : '']) }}
@endif
@endforeach
@endif