Closed vuthaihoc closed 6 years ago
When my option have an item with key "id", it make label error My config country.list
country.list
[ 'id' => 'Indonesia', 'br' => 'Brazil', 'mx' => 'Mexico', 'my' => 'Malaysia', 'vi' => 'Vietnam', ]
Former::select('filter_country')->options(config('country.list'));
The result
Html result
<div class="mb-2 mr-sm-2 mb-sm-0"> <label for="<option value=" id"="">Indonesia" class="sr-only">Filter country</label> <select class="form-control" id="filter_country" name="filter_country"> <option value="id">Indonesia</option> <option value="br">Brazil</option> <option value="mx">Mexico</option> <option value="my">Malaysia</option> <option value="vi">Vietnam</option> </select> </div>
I found a trick way to fix it
Former::select('filter_country')->options(config('country.list'))->id('filter_country')
But i don't know how to fix it from inner Former's code 😄
Former
Good catch -- I think this will simply remain as a "gotcha" for now. Thanks for this issue and for providing the work-around!
When my option have an item with key "id", it make label error My config
country.list
The result
Html result
I found a trick way to fix it
But i don't know how to fix it from inner
Former
's code 😄