@php $qid = $q->id; $type = strtolower($q->input_type ?? 'text'); $label = $q->label ?: 'Question'; $req = (bool) $q->is_required; $maxlen = $q->total_digits ? (int) $q->total_digits : null; @endphp
@switch($type) @case('text') @break @case('number') @break @case('textarea') @break @case('date') @break @case('select') @break @case('radio')
@foreach($q->options as $opt) @endforeach
@break @case('checkbox')
@foreach($q->options as $opt) @endforeach
@break @default @endswitch @if($q->label) {{ $q->label }} @endif