<div class="row mb-3">
  <div class="col-lg-3 col-md-4">
    <?php
    if ($field_title !='') {
      ?>
      <label class="d-block mb-0" for="<?php echo $field_id ?>"><?php echo $field_title ?></label>
      <?php
    }
    if ($field_subtitle !='') {
      ?>
      <small><?php echo $field_subtitle ?></small>
      <?php
    }
     ?>
  </div>

  <?php
  // Convert Stored Value to array
  $form_value_array = explode(',', $form_value);

  ?>

  <div class="col-md-8">
    <div class="form-group">
      <select
        name="<?php echo $field_id ?><?php if ($field_multiple == true) { echo '[]'; } ?>" class="form-control tt-select-single"
        <?php if ($field_multiple == true) { echo ' multiple="multiple"'; } ?>
        <?php   if ($field_required == true) { echo 'required' ;   } ?>
        >
        <?php
          if ($field_multiple != true) {
            ?> <option value=""  disabled selected>Select Option</option> <?php
          }
          foreach ($field_options as $optionsvalue => $option_single) {
             ?>
            ?>
                <option
                  value="<?php echo $optionsvalue; ?>"
                  <?php
                    if(in_array($optionsvalue, $form_value_array)){
                      echo "selected";
                    }
                   ?>
                  >
                  <?php echo $option_single; ?>
                </option>
            <?php
          }
        ?>
      </select>
       <?php
        if ($field_desc !='') {
          ?>
          <small><?php echo $field_desc ?></small>
          <?php
        }
      ?>
    </div>
  </div>
</div>
