selected option not working

Posted 1 year ago by muazzamazaz

I am getting selected option from db as

@foreach($admins as $index => $admin)
                      <Select name="region" class="form-control" id="region" placeholder="Region">
                                  <Option value="AS" @if ($admin->region == 'AS')  selected = "selected" @endif >Asia</option>
                                  <option value="ME" @if ($admin->region == 'ME')  selected = "selected" @endif >Middle East</option>
                                  <option value="EU" @if ($admin->region == 'EU')  selected = "selected" @endif >Europe</option>

but not showing selected option

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.