Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id="items-add-form" novalidate role="form" enctype="multipart/form-data" class="form multi-form page-form" action="<?php print_link("items/add?csrf_token=$csrf_token") ?>" method="post" >
- <!--[main-form-start]-->
- <div>
- <table class="table table-striped table-sm" data-maxrow="100" data-minrow="1">
- <thead>
- <tr>
- <th class="bg-light"><label for="product">Product</label></th>
- <th class="bg-light"><label for="qun">Qun</label></th>
- <th class="bg-light"><label for="unite_price">Unite Price</label></th>
- <th class="bg-light"><label for="sub_total">Sub Total</label></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <?php
- for( $row = 1; $row <= 1; $row++ ){
- ?>
- <tr class="input-row">
- <td>
- <div id="ctrl-product-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-product-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('product',"", $row); ?>" type="text" placeholder="Enter Product" required="" name="row<?php echo $row ?>[product]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-qun-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-qun-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('qun',"", $row); ?>" type="number" placeholder="Enter Qun" step="0.1" required="" name="row<?php echo $row ?>[qun]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-unite_price-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-unite_price-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('unite_price',"", $row); ?>" type="number" placeholder="Enter Unite Price" step="0.1" required="" name="row<?php echo $row ?>[unite_price]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-sub_total-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-sub_total-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('sub_total',"", $row); ?>" type="number" placeholder="Enter Sub Total" step="0.1" required="" name="row<?php echo $row ?>[sub_total]" class="form-control " />
- </div>
- </td>
- <th class="text-center">
- <button type="button" class="close btn-remove-table-row">×</button>
- </th>
- </tr>
- <?php
- }
- ?>
- </tbody>
- <tfoot>
- <tr>
- <th colspan="100" class="text-right">
- <?php $template_id = "table-row-" . random_str(); ?>
- <button type="button" data-template="#<?php echo $template_id ?>" class="btn btn-sm btn-light btn-add-table-row"><i class="fa fa-plus"></i></button>
- </th>
- </tr>
- </tfoot>
- </table>
- </div>
- <!--[main-form-end]-->
- <div class="form-group form-submit-btn-holder text-center mt-3">
- <div class="form-ajax-status"></div>
- <button class="btn btn-primary" type="submit">
- Submit
- <i class="fa fa-send"></i>
- </button>
- </div>
- </form>
- <!--[table row template]-->
- <template id="<?php echo $template_id ?>">
- <tr class="input-row">
- <?php $row = 1; ?>
- <td>
- <div id="ctrl-product-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-product-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('product',"", $row); ?>" type="text" placeholder="Enter Product" required="" name="row<?php echo $row ?>[product]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-qun-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-qun-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('qun',"", $row); ?>" type="number" placeholder="Enter Qun" step="0.1" required="" name="row<?php echo $row ?>[qun]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-unite_price-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-unite_price-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('unite_price',"", $row); ?>" type="number" placeholder="Enter Unite Price" step="0.1" required="" name="row<?php echo $row ?>[unite_price]" class="form-control " />
- </div>
- </td>
- <td>
- <div id="ctrl-sub_total-row<?php echo $row; ?>-holder" class="">
- <input id="ctrl-sub_total-row<?php echo $row; ?>" value="<?php echo $this->set_field_value('sub_total',"", $row); ?>" type="number" placeholder="Enter Sub Total" step="0.1" required="" name="row<?php echo $row ?>[sub_total]" class="form-control " />
- </div>
- </td>
- <th class="text-center">
- <button type="button" class="close btn-remove-table-row">×</button>
- </th>
- </tr>
- </template>
- <!--[/table row template]-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement