I am using bootstrap-table and i am trying to set up checkboxes, the problem is that the checkboxes are initiated as checked for no particular reason
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script type="text/javascript" src="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.js"></script>
<title>Bootstrap Table</title>
</head>
<body>
<div class="container">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">why checked?</div>
<div class="panel-body">
<table data-row-style="rowStyle" data-toggle="table" data-click-to-select="true">
<thead>
<th data-field="dd" data-checkbox="true">
</th>
<th data-sortable="true">
x
</th>
<th data-sortable="true">
y
</th>
<th data-sortable="true">
z
</th>
<th data-sortable="true">
t
</th>
<th data-sortable="true">
r
</th>
<th data-sortable="true">
m
</th>
<th></th>
</thead>
<tbody>
<tr>
<td>
</td>
<td> 1</td>
<td>2</td>
<td>3</td>
<td> 4</td>
<td> 5</td>
<td><span class="label label-default">xxx</span></td>
<td>
<div class="form-inline text-right">
<form class="form-group" action="{{url('invobj')}}/{{$obj->id}}/edit" method="post">
<button class="btn btn-primary btn-xs"><i class="glyphicon glyphicon-pencil"></i></button>
</form>
<form class="form-group" action="{{url('invobj')}}/{{$obj->id}}" method="post">
<input name="_method" type="hidden" value="DELETE">
<input type="hidden" name="_token" value="{{csrf_token()}}">
<button class="btn btn-warning btn-xs"><i class="glyphicon glyphicon-remove"></i></button>
</form>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
demo:http://jsfiddle.net/e3nk137y/12160/
Second question, how do i add a name and a value to the checkboxes, i have tried to return a value/custom attribute from a data-formatter
function but didn't see any alteration in the dev tool
The documentation doesn't mention any attribute/function/event to customise thouse checkboxes
Update it seems that if you want to sort the selected elements the first column (checkbox column) disappears