I have a table with hotels as columns and weeks as rows. The prices for each combination are in the cells.
Hotel 1 Hotel 2 Hotel 3
Week 1 123 234 345
Week 2 987 876 765
Week 3 555 444 333
I'd like to show a table for each hotel. For that I need to hide the columns of all other hotels. Is it possible to do that dynamically, e. g. by adjusting the shortcode or adding some simple code?
If that's not possible, the only way to achieve that would be to create multiple wpDataTables with the same master file as source, but each wpDataTable with different hidden columns, right?
Yes you can do that manually by creating more tables and hiding columns that you dont need. At the moment you can not do it dynamically with columns, but if is possible to convert that table so you can create table that hotels will be in one column and column header to be weeks like this
Hotels Week 1 Week 2 Week 3
Hotel 1 123 234 345
Hotel 2 987 876 765
Hotel 3 555 444 333
Then you will import that file with third option in our table wizard and you will create manual table. After this will be created MySQL tables in database like wp_wpdatatable_1 which you can use for creating table from MySQL and placeholders like this
SELECT * FROM wp_wpdatatable_1 WHERE hotels=%VAR1%
For backend preview you will provide some value for VAR1 to table generation. On Front, you will pass in var1 in shortcode that you need so like this you will have one table and you can show it in different views on other pages like this
Thanks a lot for your reply. Changing the format might be an option. I know about the placeholders. That could be a good solution, but from a usability perspective, it might be no very intuitive to have the timeline horizontal.
I'll discuss this with my team and let you know in case we need more help or have a update for you. Thanks again!
Hi there
I have a table with hotels as columns and weeks as rows. The prices for each combination are in the cells.
Hotel 1 Hotel 2 Hotel 3
Week 1 123 234 345
Week 2 987 876 765
Week 3 555 444 333
I'd like to show a table for each hotel. For that I need to hide the columns of all other hotels. Is it possible to do that dynamically, e. g. by adjusting the shortcode or adding some simple code?
If that's not possible, the only way to achieve that would be to create multiple wpDataTables with the same master file as source, but each wpDataTable with different hidden columns, right?
Thanks for your help.
Hi Marcial,
Thank you for your purchase.
Yes you can do that manually by creating more tables and hiding columns that you dont need. At the moment you can not do it dynamically with columns, but if is possible to convert that table so you can create table that hotels will be in one column and column header to be weeks like this
Hotels Week 1 Week 2 Week 3
Hotel 1 123 234 345
Hotel 2 987 876 765
Hotel 3 555 444 333
Then you will import that file with third option in our table wizard and you will create manual table. After this will be created MySQL tables in database like wp_wpdatatable_1 which you can use for creating table from MySQL and placeholders like this
SELECT * FROM wp_wpdatatable_1 WHERE hotels=%VAR1%
For backend preview you will provide some value for VAR1 to table generation. On Front, you will pass in var1 in shortcode that you need so like this you will have one table and you can show it in different views on other pages like this
[wpdatatable id1 var1="Hotel 1"]
then on other page
[wpdatatable id1 var1=" Hotel 2"]
You can check out more about placeholders here.
Best regards.
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 Milan
Thanks a lot for your reply. Changing the format might be an option. I know about the placeholders. That could be a good solution, but from a usability perspective, it might be no very intuitive to have the timeline horizontal.
I'll discuss this with my team and let you know in case we need more help or have a update for you. Thanks again!
Hi Marcial
I'm glad to hear Milan's suggestion will help you out with this.
Please let us know if there's anything else we can do for you.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables