@extends('layouts.questionnaire') @section('title', 'Form Kuesioner') @section('content') @php $totalQuestions = $stressQuestions->count() + $academicQuestions->count(); $scaleItems = [ ['score' => 1, 'label' => 'Sangat Tidak Setuju'], ['score' => 2, 'label' => 'Tidak Setuju'], ['score' => 3, 'label' => 'Netral'], ['score' => 4, 'label' => 'Setuju'], ['score' => 5, 'label' => 'Sangat Setuju'], ]; $hasAnswerErrors = collect($errors->getMessages()) ->keys() ->contains(fn (string $key): bool => str_starts_with($key, 'answers')); $hasIdentityErrors = collect($errors->getMessages()) ->keys() ->contains(fn (string $key): bool => in_array($key, ['name', 'gender', 'class_name', 'npsn'], true)); $initialStep = (old('answers') || $hasAnswerErrors) && ! $hasIdentityErrors ? 'questions' : 'identity'; @endphp

Form kuesioner siswa

Isi kuesioner dengan jujur sesuai kondisi kamu.

Mulai dari biodata, lalu lanjut ke kuesioner. Tidak ada jawaban benar atau salah.

@csrf @if ($errors->any())

Periksa kembali isian kuesioner.

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Langkah 1

Biodata

Langkah 2

Kuesioner

@endsection @push('scripts') @endpush