I like the functionality of the tabs, especially being able to use field rules to show or hide an entire tab. I have a tab on a form that I need to show or hide depending on what is chosen from a radio button. Usually this is very straightforward. But on this form I've passed in a year parameter. Then in the ready function of my javascript I replace the year in several locations on the form. This way I don't have to rewrite a new version of this form every year. One of those locations where I insert the year is in the text of this radio button.
Before the substitution the radio buttons look like this:
This form has the year passed in and then does a few calcs on it to update the year-based placeholders in the form. When the field above is shown on the live form it looks something like this:
The Field Rule seemed simple enough to create, but upon further inspection the ruling on the field had to be overturned. Because I substituted 2016 for {twoYearsAgo} in the form, this value doesn't exist in the radiobutton choice any longer, so it can't be chosen.
I believe showing/hiding the tab and it's contents will be a two part process. The first will be showing/hiding the contents of that 'page'. The second will be showing/hiding the actual tab itself at the top of the form. I believe I have found the div where the contents live and have that part figured out. The showing/hiding of the actual tab is stumping me though. How do I show/hide it?