<button type="button" class="btn btn-xs blue fright" id="addnewRow" data-selectClass="operationinstructions" data-tableName="operationinstructions"><i class="fa fa-plus"></i> Add</button></td>
<input type="hidden" id="slctTbl" value="">
<input type="hidden" id="controllName" value="instruction">
<input type="hidden" id="selectname" value="transferInstructions">

<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="transferInstructions" id="edtSlct" data-select2="yes" data-id="{$mydata->id}" data-colName="insttext" data-tableName="operationinstructions" value="{$mydata->insttext}"/>
            </a>
        </td>
        <td>
            <a class="delrow fa fa-times btn red fleft" data-colName="deleted" data-link="instruction" data-tableName="operationinstructions" data-fn="delinst" data-id="{$mydata->id}" ></a>
        </td>
    </tr>

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

</table>
