lundi 3 septembre 2018

dropdown box value's default value shows what is saved in database.

I have a dropdown box, and this is the format for the create.blade.php

<div class="col-sm-6">
  <label for="order_mode">Order Mode</label>
    <select class="form-control" id="order_mode" name="order_mode">
       <option value="fcfs">First Come, First Serve</option>
       <option value="pre-selling">Pre-Selling</option>
       <option value="purchase-order">Purchase Order</option>
    </select>
</div>

I want to use the same format for the edit.blade.php but I want to show what the selected value is as the default, and when I change it and hit update, then the changes will be saved.

the value for the order_mode is denoted by value=""



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire