I found the CSS code to hide the "New", "Edit" and "Delete" buttons. This code applies to all tables (Backend+Frontend).
.DTTT_button_new { display: none !important; }
.DTTT_button_delete { display: none !important; }
On my page are 5 tables and only 2 of them (ID 1 and 2) shall be limited to "Edit" by the user. Another user shared code to implement into functions.php file of the theme, but I wasn't able to do it successfully.
1. Can I limit the button hiding to the Frontend and see all the buttons on the backend?
2. Can I limit the CSS code to specific tables or could you provide the code (and where to add) for the functions.php?!
1. Yes you can limit the button hiding to the Frontend and see all the buttons on the backend. You have to insert that css code on page where are you insert wpdatatables between style tag.
(<style> Code here...</style>)
2. Yes you can limit the CSS code to specific tables on the page like I suggest in 1.
You have 5 tables on the page and every table have specific id which can you use for targeting only tables that you need.That is generated by wpdatatables so your first table will have id table_1, second id table_3, third id table_5...
when you want to use the WPDataTables as a frontend form to collect data from users, it might be helpful to limit the actions users can apply to the tables.
I want to share my experiences (with the help of Milan -Thank you!).
Hiding "New", "Edit" or "Delete" buttons only on frontend works, when this code is saved to the page. Code applying to all tables on the page:
<style>
.DTTT_button_new { display: none !important; }
.DTTT_button_delete { display: none !important; }
</style>
[wpdatatable id=1]
Hiding "New" and "Delete" button only in id "table_1". That id can be different from the table No. in the shortcode.
It wouldn't make sense to hide only the "New" button because inside the edit-box there is a button "Save and add new" or similar. You can hide it like this (only table_1):
Hi,
I found the CSS code to hide the "New", "Edit" and "Delete" buttons. This code applies to all tables (Backend+Frontend).
.DTTT_button_new { display: none !important; }
.DTTT_button_delete { display: none !important; }
On my page are 5 tables and only 2 of them (ID 1 and 2) shall be limited to "Edit" by the user. Another user shared code to implement into functions.php file of the theme, but I wasn't able to do it successfully.1. Can I limit the button hiding to the Frontend and see all the buttons on the backend?
2. Can I limit the CSS code to specific tables or could you provide the code (and where to add) for the functions.php?!
Thanks
Martin
Hi Martin,
Thank you for your purchase.
1. Yes you can limit the button hiding to the Frontend and see all the buttons on the backend. You have to insert that css code on page where are you insert wpdatatables between style tag.
(<style> Code here...</style>)
2. Yes you can limit the CSS code to specific tables on the page like I suggest in 1.
You have 5 tables on the page and every table have specific id which can you use for targeting only tables that you need.That is generated by wpdatatables so your first table will have id table_1, second id table_3, third id table_5...
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi,
when you want to use the WPDataTables as a frontend form to collect data from users, it might be helpful to limit the actions users can apply to the tables.
I want to share my experiences (with the help of Milan -Thank you!).
Hiding "New", "Edit" or "Delete" buttons only on frontend works, when this code is saved to the page. Code applying to all tables on the page:
<style>
.DTTT_button_new { display: none !important; }
.DTTT_button_delete { display: none !important; }
</style>
[wpdatatable id=1]
Hiding "New" and "Delete" button only in id "table_1". That id can be different from the table No. in the shortcode.
<style>
.wpDataTables.wpDataTablesWrapper a.dt-button.new_table_entry.DTTT_button.DTTT_button_new[aria-controls="table_1"], .wpDataTables.wpDataTablesWrapper a.dt-button.delete_table_entry.DTTT_button.DTTT_button_delete[aria-controls="table_1"]{ display: none !important; }
</style>
[wpdatatable id=1]
Hiding paginating and breadcrumb nav. for all tables on that page:
<style>
.paginate_button { display: none !important; }
.breadcrumb-navigation { display: none !important; }
</style>
[wpdatatable id=1]It wouldn't make sense to hide only the "New" button because inside the edit-box there is a button "Save and add new" or similar. You can hide it like this (only table_1):
<style>
#table_1_apply_edit_dialog.btn.btn-success.btn-icon-text.waves-effect { display: none !important; }
</style>
Have a nice table-building... :)
Kind regardsMartin
Hi Martin,
You are welcome. Glad that we help you.
If you have any more issues feel free to open a new ticket, we will gladly help.
We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables