
<input type="hidden" id="accountDDLIdTemp" value="{$accountDDLId}"/>
<span id="spryselect3">
    <!--<select class="selectx1 wdt100" name="accountid" id="accountid" onchange="loadAccountnumber(this.value);">-->
    <select class="selectx1 wdt100" name="{$accountDDLId}" id="{$accountDDLId}" data-accountdetailsdiv="{$accountDetailsDiv}" onchange="loadAccountnumber(this.value, this.id);">
        <option value="-1">اختر حساب</option>


        {foreach $accountData as $account}


        <option value="{$account->accountid}">{$account->accountname}</option>


        {/foreach}



    </select>
    <span class="selectInvalidMsg">*</span></span>


{literal}
<script type="text/javascript">
    //    $('#accountid').select2();
//    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {isRequired: false, invalidValue: "-1"});

    var accountDDLIdTemp = $('#accountDDLIdTemp').val();
    $('#accountDDLIdTemp').remove();
    $('select #' + accountDDLIdTemp).select2();
    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {isRequired: false, invalidValue: "-1"});
</script>
{/literal}