<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
  $ads_option_value = explode('<MAHAMUDFUTUREIT>', $form_value);
  $ads_custom_code = $ads_option_value[0];
  $ads_photo_link = $ads_option_value[1];
  $ads_position_name = $ads_option_value[2];
  $ads_photo_src = $ads_option_value[3];
?>
  <div class="col-md-8">
      <div class=" border rounded-2 p-2">
        <div class="mb-2">
          <label class="form-label">Custom Ads Code <span class="text-warning">(First Priority)</span> </label>
          <textarea  id="<?php echo $field_id ?>_CODE" name="<?php echo $field_id ?>[custom_code]"  class="form-control" rows="3"><?php echo $ads_custom_code ?></textarea>
          <style media="screen">   .cm-s-material-ocean.CodeMirror { overflow:hidden; border-radius: 5px; } </style>
          <script>
            $(document).ready(function(){
            var config = {
              mode: "text/html",
              extraKeys: {"Ctrl-Space": "autocomplete"},
              lineNumbers: true,
              keyMap:"sublime",
              tabSize:4,
            };
            // initialize editor
            var editor = CodeMirror.fromTextArea(document.getElementById('<?php echo $field_id ?>_CODE'),config);
            editor.setOption("theme", "material-ocean");
            });
          </script>
        </div>
        <div class="position-relative my-4">
          <hr>
          <span style=" position: absolute; text-align: center; top: -12px; padding: 0 10px; background: #f6f9ff; left: 50%;   transform: translate(-50%, 0); ">or Photo Ads</span>
        </div>
        <div class="mb-2">
          <label for="" class="form-label">Image Ads Url</label>
          <input type="text" class="form-control" name="<?php echo $field_id ?>[img_link]" value="<?php echo $ads_photo_link ?>" placeholder="Image Ads URL">
          <input type="hidden" class="form-control" name="<?php echo $field_id ?>[ads_title]" value="<?php echo $field_title ?>" placeholder="Image Ads URL">
        </div>
        <label for="" class="form-label">Ads Image Link</label>
        <div class="m-0 input-group">
          <input id="<?php echo $field_id ?>" name="<?php echo $field_id ?>[img_url]" type="url" class="form-control   border-info" value="<?php echo $ads_photo_src ?>" placeholder="Select Image" >
          <a href="#" class="addMediaButton  input-group-text border-info bg-info text-white   copy_link" data-media_type="<?php echo $field_f_type ?>" data-bs-toggle="modal" data-bs-target="#SelectMedia" data-target="#<?php echo $field_id ?>">
             <i class="ri-links-line pe-2"></i> Select files
          </a>
        </div>
       <div>
         <img class="img-fluid rounded border bg-white" style="width: 40%;"  id="<?php echo $field_id ?>_Preview" src="<?php echo $ads_photo_src ?>">
       </div>
      </div>
      </div>
</div>
