Select element dose not display selected value in it’s input field – Laravel

Just putting the value in select won’t make the option selected. You have to add the selected attribute in an option to make it selected.

<select type="text" name="storename" class="form-control"> 
    <option> ~ SELECT STORE NAME ~</option>
    <option {{ $list->storename == 'PACKAGES' ? 'selected' : '' }}>PACKAGES</option>
    <option {{ $list->storename == 'EMPORIUM' ? 'selected' : '' }}>EMPORIUM</option>
    <option {{ $list->storename == 'FORTRESS' ? 'selected' : '' }}>FORTRESS</option>

Same applies for the ORDER STATUS selection. However I can see you are not using any value for options. It’s good to use a value for each option. Consider using a unique value for each option.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top