Question: **BLADE FILE FOR EDIT**

```
<div class="form-group mb-3">
                        <label>Country:</label>
                        <div class="col-sm-4">
                        <select  id="country-dd" name="country[]" class="js-example-basic-multiple form-control" multiple="multiple">
                        @foreach($countries as $country)
                        <option value="{{$country->id }}" {{$country->id == $user->country ? 'selected' : '' }}> {{$country->name}}</option>
                        @endforeach
                        </select>
                    </div>
                    </div>

```

**CONTROLLER**

```
public function edituser(Request $request, $id = null){
        $this->authorize('Admin');
        $userstateid = [];
        $user = new User;
        $user = $user->where('id', $id)->first();
        $countries = Country::get();
        $states = State::get();
        $cities = City::get();
        $roles = Role::get();
        //dd($user);
        return view('edituser',compact('user', 'countries', 'states', 'cities', 'roles'));
    } 

```

On Edit page, I want to pre-fill select box with user selected countries. Please help me with the same. Thanks in advance

Answer: 
I think you missed to assign key to form widget

```
body: Form(
 key: _formKey,
 child: Padding(
...

```
You have to pass the key to the Form for the form to know it has a key:

```
Scaffold(
    body: Form(
        key: _formKey,        // <== here
        child: Padding(

```