-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perbaikan select epidemi penyakit #414
Conversation
@if($epidemi->penyakit_id == $key) | ||
<option selected value="{{ $key }}">{{ $penyakit }}</option> | ||
@else | ||
<option value="{{ $key }}">{{ $penyakit }}</option> | ||
@endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gunakan @selected, cek komentar issue apa yg disarankan #400 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mas @andifahruddinakas sudah dipush kembali, tolong direview apa sudah sesuai
@@ -11,7 +11,7 @@ | |||
<div class="col-md-8"> | |||
<select class="form-control" id="penyakit_id" name="penyakit_id"> | |||
@foreach($jenis_penyakit as $key=>$penyakit) | |||
<option value="{{ $key }}">{{$penyakit}}</option> | |||
<option value="{{ $key }}" {{ old('penyakit_id', $epidemi->penyakit_id) == $key ? 'selected' : null}}>{{ $penyakit }}</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gunakan @selected()
Mas @devrakapriyo, silahkan diperbaiki PR ini sesuai yang diharapkan. |
Pagi mas @andifahruddinakas tolong direview lagi, sudah ditambahkan blade @selected |
Pak @eddieridwan, ini sudah ok. |
@all-contributors please add @devrakapriyo for code |
I've put up a pull request to add @devrakapriyo! 🎉 |
#400