{{ $q['question'] }}
@if ($q['reponses'] ?? 0 && ($r['value'] == 'radio' || $r['value'] == 'checkbox'))
@if (isset($q) && $q['reponses'][0]['name'] == 'projet_q1[]') @foreach ($q['reponses'] as $r) @php try { $checked = (json_decode($group->brief[str_replace('[]', '', $r['name'])]) == $r['value'] ? 'checked' : '' || (gettype(json_decode($group->brief[str_replace('[]', '', $r['name'])])) == 'array' && in_array($r['value'], json_decode($group->brief[str_replace('[]', '', $r['name'])])))) ? 'checked' : ''; } catch (Exception $e) { $checked = ''; } @endphp @if ($r && $r['libelle'] == 'Autre') @endif @if ($r && $r['name'] == 'projet_q4' && $r['value'] == 'Oui') @endif @endforeach @else @foreach ($q['reponses'] as $r) @php try { $checked = ($group->brief[str_replace('[]', '', $r['name'])] == $r['value'] ? 'checked' : '' || (gettype($group->brief[str_replace('[]', '', $r['name'])]) == 'array' && in_array($r['value'], $group->brief[str_replace('[]', '', $r['name'])]))) ? 'checked' : ''; } catch (Exception $e) { $checked = ''; } @endphp @if ($r && $r['libelle'] == 'Autre') @endif @if ($r && $r['name'] == 'projet_q4' && $r['value'] == 'Oui') @endif @endforeach @endif
@endif @if ($q['type'] == 'textarea')
@endif @if ($q['type'] == 'text')
@endif