How can I hide the checkbox that are to the left of each record in tableview? They are confusing to my users.
TD
Hide record checkboxes
Hide record checkboxes
- Attachments
-
- appgini checkbox.jpg (18.22 KiB) Viewed 3358 times
Re: Hide record checkboxes
Create fileHow can I hide the checkbox
hooks/TABLENAME-tv.js
, if not exists:(1) Hide select-checkboxes in table view
Code: Select all
// file: hooks/TABLENAME-tv.js
jQuery(() => {
jQuery('.record_selector,#select_all_records').hide()
});
Note, an empty column will remain, which may also confuse users.
Removing checkboxes but keeping the first column is useful for example when having additional buttons in first column. Unless you need it, see alternative code below for hiding the whole column.
(2) Hide column, having select-checkboxes
Code: Select all
// file: hooks/TABLENAME-tv.js
jQuery(() => {
jQuery('.record_selector,#select_all_records').closest('th,td').hide()
});
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide record checkboxes
Thank you Jan ! One last question, the checkboxes and column appear just for a faction of a second then disappear whenever the page loads / reloads.
Is there a way to eliminate this? If not, your reply was a great help!
TD
Is there a way to eliminate this? If not, your reply was a great help!
TD
Re: Hide record checkboxes
You can try to hide the whole table using CSS, first, then
Hiding table using CSS could be done in
Something like this:
Note: If hiding in
.show()
or .fadeIn()
in Javascript after you have applied the checkbox-fix.Hiding table using CSS could be done in
hooks/header-extras.php
, for example using display: none;
on your table element. But I cannot guarantee this is flicker-free. Should be working - not tested.Something like this:
Code: Select all
<!-- file: hooks/header-extras.php -->
<style>
table[data-tablename="YOURTABLENAME"] {
display: none;
}
</style>
Code: Select all
// file: hooks/TABLENAME-tv.js
jQuery(() => {
jQuery('.record_selector,#select_all_records').closest('th,td').hide()
jQuery('table[data-tablename="YOURTABLENAME"]').show();
});
Note: If hiding in
hooks/header-extras.php
is too late and UI is still flickering, you may try in TABLENAME_header()
-hook-function in hooks/TABLENAME.php
. Not tested.Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: Hide record checkboxes
Jan your last post works perfectly! I always learn from your replies, thank you again!