How to use Tabs getActiveTab() in form

Hi, everyone. I have two tabs in one form. and i want to get active tab id when tab changed. How we can get active tab id with getActiveTab() such in TextInput ?
9 Replies
Filament
Filament2y ago
Please ask about the actual problem you're trying to solve, instead of your attempted solution. https://xyproblem.info
mszabeh
mszabehOP2y ago
Does anyone have any comments?
Dan Harrin
Dan Harrin2y ago
the question is very vague and we dont know what you are talking about. what do you want to do? tell us more information
mszabeh
mszabehOP2y ago
I have two tabs in one form. and i want to get active tab id when tab changed.
Dan Harrin
Dan Harrin2y ago
i dont think thats possible on the backend because its a javascript property if you want it on the frontend then please be specific as to where.
mszabeh
mszabehOP2y ago
so , how we can use getActiveTab()? just in backend?
awcodes
awcodes2y ago
Where are you trying to get the active tab and how are you trying to use it?
mszabeh
mszabehOP2y ago
I have one field address_id for chose one address from user addresses in tab #1 and i have card for insert new address fields in tab #2 i need to set requred() to addres_id field in tab #1 if tab 1 activated and set required() to all fileds in tab 2 , if tab 2 activated.
awcodes
awcodes2y ago
So, just make those fields in tab 2 required if the field in tab one is null. The actual tab doesn’t matter. Sounds like a form wizard might be more appropriate than tabs in this case though. But with tabs it’s still all part of the same form, so you can validate against the value of a field in another tab. You can get values from other tabs using the ../field syntax with the $get closure.
Want results from more Discord servers?
Add your server