PDA

View Full Version : Setting Tab visibility.



Samarex
December 27th, 2017, 13:51
Hello all you coding guru's
I have a question and not sure if it is possible
I have placed a check box on the Characters Main page (next to and above Name.)
Is it possible to code the system so that if this Checkbox it checked a Tab on the character sheet is visible. If it is not checked the the tab is not shown?

Thanks
Samarex

damned
December 27th, 2017, 14:11
Hey Samarex have a look at the nWoD ruleset and see if the code that is used there to change character sheets could work for you...

Ken L
December 28th, 2017, 03:31
It's completely doable.

Just need to stick a little logic in the <script> tag in the window to make visible/invisible elements of your choosing based on a trigger. Just make sure to name each of your tabs/checkboxes such that you can check their state by invoking window.<element-name>. FG has a bad habit of making un-named elements I've found.

damned
December 28th, 2017, 03:38
On MoreCore I have a half page of fields that contains 6 "panels" of data. Each of them has a "toggle" so you can "flip the panel" and have different data on the other side.
That uses a method like what Ken L describes making things visible/hidden.