Capture or pass a class name or a variable from a button and a tab
-
Hello CFF,
I have the following set up.
There are 3 buttons in a page: say btn1, btn2, and btn3.
Each button have a class that pops up a popup using Popup Maker Plugin.
In my Popup Maker popup, I added 3 tabs to correspond to the 3 buttons: say tab1, tab2, and tab3.
Each tab have: [CP_CALCULATED_FIELDS id=”35″]
So, I am reusing the same form for the 3 tabs.
What I am looking for is the following.
When a user clicks btn1, the popup pops up but I need to open tab1 meaning tab1 becomes active.
When a user clicks btn2, the popup pops up but I need to open tab2 meaning tab2 becomes active.
When a user clicks btn3, the popup pops up but I need to open tab3 meaning tab3 becomes active.
Once a user is in any active tab, I need my from code to know in on which tab the user is currently in and so I can show/hide some fields and collect values depending on the active tab.
Is there a way to pass a class name or a variable from each button (btn1, btn2, and btn3) to the form?
and if so, I capture that value and make the corresponding tab active?
When a user pops up the pop up and be in the active tab, then the user still can click on other tabs so the active tab is changed, how I can capture the active tab?
Is there a way to add a class or a variable to [CP_CALCULATED_FIELDS id=”35″] and so I use it to know which tab is active and return a value that will determine which fields to show/hide?
For example,
in tab1 [CP_CALCULATED_FIELDS id=”35″ class=”tab1″]
in tab2 [CP_CALCULATED_FIELDS id=”35″ class=”tab2″]
in tab3 [CP_CALCULATED_FIELDS id=”35″ class=”tab3″]
Thank you very much for your help.
- The topic ‘Capture or pass a class name or a variable from a button and a tab’ is closed to new replies.