@php $due_diligence_id = $due_diligence->id; $due_diligence_title = $due_diligence->title; $due_diligence_question_id = $due_diligence_question->id; $title = $due_diligence_question->title; $field_type = $due_diligence_question->field_type; $selected_file_type_arr = @json_decode(@$due_diligence_question->file_type) ?? []; $have_option = $due_diligence_question->have_option; $order = $due_diligence_question->order; $is_required = $due_diligence_question->is_required; $message = $due_diligence_question->message; $option_for_repeater = []; if($have_option == "Y") { foreach($due_diligence_question_options as $key => $record) { $option_for_repeater[$key]['caption'] = $record->caption; $option_for_repeater[$key]['have_field'] = $record->have_field; $option_for_repeater[$key]['field_type'] = $record->field_type; } } @endphp @php $file_type_html = ' '; $file_type_html = $file_type_html. '
'; foreach($file_type_arr as $type => $caption) { $switch_class = "switch-primary"; $check_class="file_type"; if($type == 'all') { $switch_class = "switch-success"; $check_class="select_all_file_type"; } //for edit only $checked = @in_array($type,$selected_file_type_arr) ? "checked" : ""; $file_type_html = $file_type_html. ' '; } $file_type_html = $file_type_html. '
'; $sub_question = '
'; $add_option_with_field_html = '
Add
'.$sub_question.'
'; $add_option_html = '
Add
'; @endphp
Edit Question
@csrf
@if($field_type == 'file') {!! $file_type_html !!} @elseif($have_option == 'Y') @if($field_type == 'select' || $field_type == 'radio') {!! $add_option_with_field_html !!} @else {!! $add_option_html !!} @endif @endif