View file File name : best_deals.php Content :<div class="container-fluid"> <div class="col-md-12 content-center loan-comparision"> <div class="card-plain"> <form class="form" method="post" action="<?=base_url()?>Properties/add_bestdeal" enctype="multipart/form-data"> <div class="header"> <div class="logo-container"> <img src="assets/images/logo.svg" alt=""> </div> <h5 CLASS="text-center"> ADD BEST DEALS</h5> </div> <div class="content row"> <div class="form-group col-md-12"> <div> Select Properties <span style="color:red;font-size:10px;"> * Only Active / Approved properties can be added in BEST DEAL</span></div> <select class="js-example-basic-multiple form-control" name="properties[]" required multiple="multiple" placeholder="Nearby"> <?php foreach($properties as $n){ ?> <option <?php echo $n->approval!="na" && $n->deleted==0 ? "":"disabled"; ?> value="<?=$n->id?>"><?=$n->project_code?> ( <?php echo $n->approval!="na" && $n->deleted==0 ? "Active":"Inactive"; ?> )</option> <?php } ?> </select> </div> <input type="hidden" name="updated_by" value="<?=$_SESSION['users']->id?>" placeholder="updated_by" class="form-control" /> </div> </div> <div class="footer text-center"> <button type="submit" class="btn l-cyan btn-round btn-lg btn-block waves-effect waves-light">Submit</button> </div> </form> </div> </div> </div> <script> // $(document).ready(function() { $('.js-example-basic-multiple').select2(); // }); </script>