<div class="card-body">
<h4 class="card-title">Add New Report</h4>
<?php echo $form;?>
+ <p id='get-sample' style='display:none'><?php if(!empty($_GET["sample"])) echo $_GET["sample"];?></p>
<?php if(!empty($_GET["req"])){echo "<p class='text-right'><a href='attachments.php?pid=".$pid."&req=".$_GET["req"]."'>Upload PDF instead</a></p>";}?>
</div>
</div>
if($("[name='sample']").length){
$(this).prop("autocomplete","off");
$.get("autocomplete/investigation.json", function(data){
+ val=$("#get-sample").text();
$("[name='sample']").each(function(){
$(this).autocomplete({source:data.sample, highlightClass:'text-danger',treshold:0});
+ if(val.length>0){
+ $(this).val(val);
+ }
});
});
};
<div class="card-body">
<h4 class="card-title">Type of Organism</h4>
<ul class="list-group">
+ <li class="list-group-item"><a href="report.php?pid=<?php echo $pid;?>&form=report-cs<?php echo $req;?><?php echo $sample;?><?php echo $src;?>">No growth</a></li>
<li class="list-group-item"><a href="antibiogram.php?pid=<?php echo $pid;?>&form=report-as-grampos<?php echo $req;?><?php echo $sample;?><?php echo $src;?>">Vitek Report (Gram Positive)</a></li>
<li class="list-group-item"><a href="antibiogram.php?pid=<?php echo $pid;?>&form=report-as-gramneg<?php echo $req;?><?php echo $sample;?><?php echo $src;?>">Vitek Report (Gram Negative)</a></li>
<li class="list-group-item"><a href="antibiogram.php?pid=<?php echo $pid;?>&form=report-as-fungal<?php echo $req;?><?php echo $sample;?><?php echo $src;?>">Vitek Report (Fungal)</a></li>