<button type="button" class="btn btn-xs blue fright" id="addnewRow" data-selectClass="{$table}" data-tableName="{$table}"><i class="fa fa-plus"></i> Add</button>
<input type="hidden" id="slctTbl" value="">
<table cellspacing="10" width="100%" id="dtAddTbl">
    <thead>
        <tr>
            <th>Name</th>
            <th>Delete</th>
        </tr>
    </thead>
    {assign var=i value=1}
    {foreach $alldata as $mydata}
    <tr>
        <td style="width: 100%">
            <a href="#" >
                <input type="text" class="form-control updateElementSelect" data-selectClass="{$table}" id="edtSlct"  data-select2="yes" data-id="{$mydata->id}" data-colName="name" data-tableName="{$table}" value="{$mydata->name}"/>
            </a>
        </td>
        <td>
            <a class="delrow fa fa-times btn red fleft" data-colName="conditions" data-link="antenalvisit" data-fn="deldiagnosis" data-tableName="{$table}" data-id="{$mydata->id}" ></a>
        </td>
    </tr>

    {capture assign=i}{$i+1}{/capture}
    {/foreach}

</table>
<input type="hidden" id="dataClass" value="">
