<fieldset>
    <legend>Treatment</legend>
    <div class="table-responsive" style="overflow-x:auto;">
        <table id="report-table" class="table table-bordered table-striped mb-0">
            <thead>
                <tr>
                    <th colspan="7" align="left" valign="top">

                        <input class="form-control" type="text" list="Treatments" name="Treatment" id="Treatment"
                            value="" onchange="getRecords(this.value)">
                        <datalist id="Treatments">
                        <?php
        foreach($json_data2['items'] as $result) {?>
                            <option value="<?php echo $result['Treatment']; ?>">
                                <?php } ?>
                        </datalist>
                    </th>
                </tr>
                <tr>
                    <th width="20" align="center" valign="top">Select</th>
                    <th width="70"> Type </th>
                    <th width="150"> Name </th>
                    <th width="90">Dose</th>
                    <th width="90">Freq.</th>
                    <th width="90">Duration</th>
                    <th width="20">Eye </th>
                </tr>
            </thead>
            <tbody id="showTreatments">
                <tr>
                    <td align="center" valign="top"><input class="form-check-input" type="checkbox" value="1"
                            id="TreatChk1" name="TreatChk1">
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Type1" name="TreatType1" id="TreatType1"
                            value="">
                        <datalist id="Treat_Type1">
                            <?php
        foreach($json_data['JsonData']['TreatType'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" name="TreatName1" list="Treat_Name1" id="TreatName1"
                            value="" onClick="this.select();">
                        <datalist id="Treat_Name1">

                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Dose1" name="TreatDose1" id="TreatDose1"
                            value="">
                        <datalist id="Treat_Dose1">
                            <?php
        foreach($json_data['JsonData']['TreatDose'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>

                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Freq1" name="TreatFreq1" id="TreatFreq1"
                            value="">
                        <datalist id="Treat_Freq1">
                            <?php
        foreach($json_data['JsonData']['TreatFreq'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Dur1" name="TreatDur1" id="TreatDur1"
                            value="">
                        <datalist id="Treat_Dur1">
                            <?php
        foreach($json_data['JsonData']['TreatDur'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Eye1" name="TreatEye1" id="TreatEye1"
                            value="">
                        <datalist id="Treat_Eye1">
                            <?php
        foreach($json_data['JsonData']['TreatEye'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                </tr>
                <tr>
                    <td align="center" valign="top"><input class="form-check-input" type="checkbox" value="1"
                            id="TreatChk2" name="TreatChk2">
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Type2" name="TreatType2" id="TreatType2"
                            value="">
                        <datalist id="Treat_Type2">
                            <?php
        foreach($json_data['JsonData']['TreatType'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>

                    <td>
                        <input class="form-control" type="text" name="TreatName2" list="Treat_Name2" id="TreatName2"
                            value="">
                        <datalist id="Treat_Name2">

                        </datalist>
                    </td>

                    <td>
                        <input class="form-control" type="text" list="Treat_Dose2" name="TreatDose2" id="TreatDose2"
                            value="">
                        <datalist id="Treat_Dose2">
                            <?php
        foreach($json_data['JsonData']['TreatDose'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Freq2" name="TreatFreq2" id="TreatFreq2"
                            value="">
                        <datalist id="Treat_Freq2">
                            <?php
        foreach($json_data['JsonData']['TreatFreq'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Dur2" name="TreatDur2" id="TreatDur2"
                            value="">
                        <datalist id="Treat_Dur2">
                            <?php
        foreach($json_data['JsonData']['TreatDur'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Eye2" name="TreatEye2" id="TreatEye2"
                            value="">
                        <datalist id="Treat_Eye2">
                            <?php
        foreach($json_data['JsonData']['TreatEye'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>

                        </datalist>
                    </td>
                </tr>
                <tr>
                    <td align="center" valign="top"><input class="form-check-input" type="checkbox" value="1"
                            id="TreatChk3" name="TreatChk3">
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Type3" name="TreatType3" id="TreatType3"
                            value="">
                        <datalist id="Treat_Type3">
                            <?php
        foreach($json_data['JsonData']['TreatType'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" name="TreatName3" list="Treat_Name3" id="TreatName3"
                            value="">
                        <datalist id="Treat_Name3">

                        </datalist>

                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Dose3" name="TreatDose3" id="TreatDose3"
                            value="">
                        <datalist id="Treat_Dose3">
                            <?php
        foreach($json_data['JsonData']['TreatDose'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>

                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Freq3" name="TreatFreq3" id="TreatFreq3"
                            value="">
                        <datalist id="Treat_Freq3">
                            <?php
        foreach($json_data['JsonData']['TreatFreq'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Dur3" name="TreatDur3" id="TreatDur3"
                            value="">
                        <datalist id="Treat_Dur3">
                            <?php
        foreach($json_data['JsonData']['TreatDur'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                    <td>
                        <input class="form-control" type="text" list="Treat_Eye3" name="TreatEye3" id="TreatEye3"
                            value="">
                        <datalist id="Treat_Eye3">
                            <?php
        foreach($json_data['JsonData']['TreatEye'] as $result) {?>
                            <option value="<?php echo $result['Values']; ?>">
                                <?php } ?>
                        </datalist>
                    </td>
                </tr>

            </tbody>
        </table>
    </div>
</fieldset>