<div class="col-md-12" id="kegiatan-{{ $i }}">
    <div class="card">
        <div class="card-body">
            <div class="form-group" id = "list-kegiatan" @if ($errors->has('nama-kegiatan-')) has-error @endif>
                <label>Kegiatan</label>
                <label>Untuk kegiatan konferensi bisa memilih lebih dari satu</label>
                @foreach ($kegiatan as $j=>$keg)
                @php
                    $idkeg = $keg->id;
                @endphp
                    @if ($i != 0)
                        @if ($keg->id != "498633a9-082c-4a4a-9dbd-e20b678ec15e")
                            <div class="form-check">
                                <input class="form-check-input" type="radio" id="nama-kegiatan-{{ $i }}-{{ $j }}" name="kegiatan[{{ $i }}]" value="{{ $keg->id }}" onChange="cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')" required>
                                <label class="form-check-label" for="nama-kegiatan-{{ $i }}-{{ $j }}">{{ $keg->nama }}</label>
                            </div>
                        @endif
                    @else
                        <div class="form-check">
                            <input class="form-check-input" type="radio" id="nama-kegiatan-{{ $i }}-{{ $j }}" name="kegiatan[{{ $i }}]" value="{{ $keg->id }}" onChange="cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')" required>
                            <label class="form-check-label" for="nama-kegiatan-{{ $i }}-{{ $j }}">{{ $keg->nama }}</label>
                        </div>
                    @endif
                @endforeach
            </div>
            <div class="form-group" id="grup-konferensi" @if ($errors->has('konferensi')) has-error @endif>
                <label>Konferensi</label>
                <select class="form-control" id="konferensi" name="konferensi[{{ $i }}]"placeholder="">
                    <option value="" selected>- Pilih -</option>
                    @foreach ($konferensi as $kon)
                        <option onchange="cek(this.value)" value="{{ $kon->id }}">{{ $kon->nama }}</option>
                    @endforeach
                </select>
                @if ($errors->has('konferensi'))
                    <label id="login-error" class="error" for="konferensi" style="color: red">{{$errors->first('konferensi')}}</label>
                @endif
            </div>
            @if (isset($anggota))
            <label>Anggota</label>
            <select class="form-control anggota-select" id="" name="kegiatan_anggota[{{ $i }}]"placeholder="">
                <option value="" selected>- Pilih -</option>
                @foreach (json_decode($list_anggota, true) as $key => $item)
                    <option value="{{ $key }}">
                        {{ $item['nama'] }}
                        :
                        {{ $item['email'] }}
                    </option>
                @endforeach
            </select>
            @if ($errors->has('anggota'))
                <label id="login-error" class="error" for="konferensi" style="color: red">{{$errors->first('konferensi')}}</label>
            @endif
            @endif
            <br>
            @if ($i != 0)
                <div class="col-md-4 float-right">
                    <button class="btn btn-danger" type="button" onclick="hapusKegiatan('kegiatan-{{ $i }}')">Hapus</button>
                </div>
            @endif
        </div>
    </div>
</div>
