<?php 
$submit_url = $file_name."?page=view"; 
$show_all_page = "page=view";
?>
<form class="form-horizontal" action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
    <div class="card-body">
        <div class="row">
            <div class="col-lg-3 col-12">
                <label class="control-label">Customer</label>
                <?php echo $gsi->getCustomerListNew("customer", $customer, "100%", false, "form-control select2", "", ""); ?>
            </div>
            <div class="col-lg-3 col-12">
                <label class="control-label">Item No.</label>
                <input type="text" class="form-control" id="item_name" name="item_name" 
                       value="<?php echo htmlspecialchars($item_name ?? ''); ?>" 
                       placeholder="Item No." autocomplete="off">
            </div>
            <div style="clear:both;"></div>
            <div class="col-lg-4 col-12">
                <label class="control-label">&nbsp;</label><br>
                <button type="submit" class="btn btn-success">Search
                    <i class="fas fa-sync-alt fa-spin" style="display:none;" id="page_load_div"></i>
                </button>
                <button type="button" onclick="javascript:window.location='?<?php echo $show_all_page ?>'" class="btn btn-info">Clear</button>
            </div>
        </div>
    </div>
</form>
<script>
$(document).ready(function(){
    $('#search_form').submit(function(){
        $("#submit").attr("disabled", true);
        $('#page_load_div').show();
    });
});
</script>