[Solved] TabPanel1 bad index
Posted: Monday 26th February 2024 12:20am
Hi Everyone
I am stuck I have read up on how to remove a tab from a Tab Panel (I need to remove it when I add products but it shows when I edit them as it shows the products history)
But when I use the TabPanel1.remove(4) I get a Bad Index Error
I have 5 tabs in my Tab Panel
I am using TabPanel1.index = 0 to set it to the first tab (Product Information)
I have the following tabs
0 - Product Information
1 - Stock Locations
2 - Supplier & Pricing
3 - Web Settings
4 - Product History
Depending on the setting I need to always hide tab 4 when I am in Add mode but when in edit I need to hide Tab 3 if the system is set Not to sync with Opencart
can someone help me as I have no idea how to correct this.
I am stuck I have read up on how to remove a tab from a Tab Panel (I need to remove it when I add products but it shows when I edit them as it shows the products history)
But when I use the TabPanel1.remove(4) I get a Bad Index Error
I have 5 tabs in my Tab Panel
I am using TabPanel1.index = 0 to set it to the first tab (Product Information)
I have the following tabs
0 - Product Information
1 - Stock Locations
2 - Supplier & Pricing
3 - Web Settings
4 - Product History
Depending on the setting I need to always hide tab 4 when I am in Add mode but when in edit I need to hide Tab 3 if the system is set Not to sync with Opencart
can someone help me as I have no idea how to correct this.