<div class="form-row">
        <div class="form-group col-sm-3">
                <?php echo BootForm::text('Name', 'name')->placeholder('Name'); ?>	 
        </div>
        
        <div class="form-group col-sm-3">
                <?php echo BootForm::text('Name(Print)', 'name_print')->placeholder('Name(Print)'); ?>		 
        </div>
        <div class="form-group col-sm-3">
                <?php echo BootForm::text('Qty Unit', 'unit')->placeholder('Qty Unit')->attribute('id', 'unit')->value('');; ?>

        </div>
        <div class="form-group col-sm-3">
                <?php echo BootForm::text('Opening Stock', 'opening_stock')->placeholder('Opening Stock');; ?>		 
        </div>
</div>
<div class="form-row">
        <div class="form-group col-sm-4">
                <?php echo BootForm::text('HSN Code', 'hsn_code')->placeholder('HSN Code'); ?>	 
        </div>
        <div class="form-group col-sm-4">
                <?php echo BootForm::text('Bond', 'bond')->placeholder('Bond'); ?>	 
        </div>
        <div class="form-group col-sm-4">
                <?php echo BootForm::text('Bond Design', 'bond_design')->placeholder('Bond Design'); ?>	 
        </div>
        <div class="form-group col-sm-4">
                <?php echo BootForm::text('Bond Product Type', 'bond_type')->placeholder('Bond Product Type'); ?>	 
        </div>
</div>

<script>

        $( "#unit" ).on( "unit:change", function( event , value) {
           var txt = $('#opening_stock').prev('label').html();
           //console.log('hi '+txt);
           $('#opening_stock').attr('placeholder',txt+' ('+value+")");
        });
        
</script>

<?php $__env->startComponent('partials.selectize', [
        'labelField' => 'name',
        'valueField' => 'id',
        'searchField' => 'bond',
        'maxItem' => 1,
        'url' => '/admin/api/bonds/',
        'select_id' => 'bond',
        'defaultValue' => !empty(old('bond'))?old('bond'):
        ((isset($bondProduct))?implode(",", [$bondProduct->bond_id]):null),
        //'uploadedFiles' => $singer->attachments->toArray()
    ]); ?>
<?php echo $__env->renderComponent(); ?>

<?php $__env->startComponent('partials.selectize', [
        'labelField' => 'name',
        'valueField' => 'id',
        'searchField' => 'name',
        'maxItem' => 1,
        'url' => '/admin/api/bond_product_type/',
        'select_id' => 'bond_type',
        'defaultValue' => !empty(old('bond_type'))?old('bond_type'):
        ((isset($bondProduct))?implode(",", [$bondProduct->bond_type_id]):null),
        //'uploadedFiles' => $singer->attachments->toArray()
    ]); ?>
<?php echo $__env->renderComponent(); ?>

<?php $__env->startComponent('partials.selectize', [
        'labelField' => 'name',
        'valueField' => 'id',
        'searchField' => 'name',
        'url' => '/admin/api/bond_designs/',
        'select_id' => 'bond_design',
        'defaultValue' => !empty(old('bond_design'))?old('bond_design'):
        ((isset($bondProduct))?implode(",", [$bondProduct->bond_design_id]):null),
        //'uploadedFiles' => $singer->attachments->toArray()
    ]); ?>
<?php echo $__env->renderComponent(); ?>


<?php $__env->startComponent('partials.selectize', [
        'labelField' => 'name',
        'valueField' => 'id',
        'searchField' => 'name',
        'maxItems' => 1,
        'handler' => 1,
        'url' => '/admin/api/unit_qty/',
        'select_id' => 'unit',
        'defaultValue' => !empty(old('unit'))?old('unit'):
        ((isset($bondProduct))?implode(",", [$bondProduct->qty_unit_id]):null),
        //'uploadedFiles' => $singer->attachments->toArray()
    ]); ?>
<?php echo $__env->renderComponent(); ?>

<!-- Submit Field -->
<div class="form-group col-sm-12">
    <?php echo Form::submit('Save', ['class' => 'btn btn-primary']); ?>

    <a href="<?php echo route('bondProducts.index'); ?>" class="btn btn-default">Cancel</a>
</div>
<?php /**PATH /var/www/amartools/resources/views/bond_products/fields.blade.php ENDPATH**/ ?>