<select  class="form-control" name="child" id="childFor" placeholder="اختر طفل " >
    <option value=""></option>
    {if $count > 0 }

    {foreach $childs as $data}
    <option value="{$data->id}">{$data->child_name}</option>
    {/foreach}

    {/if}
</select>


{literal}
<script>
    $('#childFor').select2();
</script>
{/literal}