data-visible="false" does not create fields if converting from html table
See original GitHub issueI have an existing table to display a form with multiple rows. I am converting the table to bootstrap-table by editing the table tag.
<table id="table" data-sortable="true" data-toggle="table" data-page-size="50"
data-page-list="[50, 100, 200, All]">
It displays fine except for the fact that I have hidden fields that I need to keep for the form POST.
<thead>
<tr>
<th data-visible="false"></th>
<th data-visible="false"></th>
<th data-visible="false"></th>
<th data-sortable="true">Label</th>
<th>Description</th>
</tr>
</thead>
The fields are not displayed, however, the fields are also removed from the form.
<thead>
<tr>
<th style="" data-field="3">
<div class="th-inner sortable both">Label</div><div class="fht-cell"></div>
</th>
<th style="" data-field="4">
<div class="th-inner ">Description</div><div class="fht-cell"></div>
</th><th style="" data-field="5">
<div class="th-inner sortable both">Location</div><div class="fht-cell"></div>
</th>
</tr>
</thead>
...
<tbody>
<tr data-index="0">
<td style=""><input type="text" name="form-0-label" value="N29" maxlength="25" id="id_form-0-label"></td>
<td style=""><textarea name="form-0-desc" cols="40" rows="4" maxlength="500" id="id_form-0-desc">Enrolled at 18 weeks</textarea></td>
<td style=""><input type="text" name="form-0-location" value="Room 261" maxlength="50" id="id_form-0-location"></td>
I need the hidden fields to be returned with the form’s post. The table worked fine before converting to bootstrap-table.
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to convert a html table with cells that span into several ...
So, I was trying to get some empty list cells to fill the rest of the row wherever there is an HTML cell...
Read more >Using table content in a HTML form · Issue #371 - GitHub
Hi, I plan to send the contents of the table such as checkbox, radio button via HTML form. Is it possible? Can you...
Read more >How to Convert a Static HTML Table to a Dynamic JavaScript ...
In this post we will use the free community edition of AG Grid JavaScript Data Grid to convert from a long static HTML...
Read more >HTML to PDF Not converting HTML table?
I am trying to convert 3 different HTML files into PDFs using the OneDrive for business "Convert File". I have the HTMLs all...
Read more >Traversing an HTML table with JavaScript and DOM Interfaces
First we created the <table> element. · Next, we created the <tbody> element, which is a child of the <table> element. · Next,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In this case, maybe we can use
class
to solve the problem. Workaround example: https://live.bootstrap-table.com/code/wenzhixin/384Using class display: none seems to work. thanks.