“Jika kondisi di Laravel Blade di Opsi Pilih” Kode Jawaban

Nilai Opsi Dipilih dalam Blade Laravel

{{ old('title') == '1' ? 'selected' : '' }}
<div class="form-group col-md-6">
<label>Nationality {{$profiledata->nationality}}</label>
   <select id="nationality" required="" name="nationality" class="form-control">
    <option value="">--Select--</option>
    <option {{ ($profiledata->nationality) == 'United State' ? 'selected' : '' }}  value="United State">United State</option>
    <option {{ ($profiledata->nationality) == 'India' ? 'selected' : '' }}  value="India">India</option>
    <option {{ ($profiledata->nationality) == 'Canada' ? 'selected' : '' }}  value="Canada">Canada</option>
  </select>
</div>
Tyagi420

Jika kondisi di Laravel Blade di Opsi Pilih

<select class="form-select" aria-label="Default select example" name="category" id="category"  
                          style=" background-color : #FFFFFF; ">
                          
                            <option >Select Category</option>
                            <option {{$GETSINGLEPRODUCT->status=='active'?'selected':''}} value="{{$GETSINGLEPRODUCT->status=='active'?'active':'active'}}">Active</option>
                            <option {{$GETSINGLEPRODUCT->status=='draft'?'selected':''}} value="{{$GETSINGLEPRODUCT->status=='draft'?'draft':'draft'}}">Draft</option>
                            <option value="archived">Archeved</option>
                          </select>
Creepy Crocodile

Jawaban yang mirip dengan “Jika kondisi di Laravel Blade di Opsi Pilih”

Pertanyaan yang mirip dengan “Jika kondisi di Laravel Blade di Opsi Pilih”

Lebih banyak jawaban terkait untuk “Jika kondisi di Laravel Blade di Opsi Pilih” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya