Forums

Hide or Show Containers of type 'tab'

sonofsundyata 16 Mar, 2015
[attachment=0]Form Layout.png[/attachment]Good day, (i'm from the Netherlands, so sorry if the english is not equally tidy everywhere)

I have searched the whole internet for examples of what i want to do, but i can't find any, not even here on the forum board.

I explain first a bit of why. We are setup up a photo studio specialized in Mourning photography. To avoid problems on a day like that we want to work with a form where customers can reveal their wishes.

I made the form in the following structure:

1. Container (type: page)
a) Custom field (the intro page with explaination about the form)
b) Submit button (with submit action load page 2)

2. Container (type: page)
a) Container (type: tabs_area)
i) Container (type: tab)
ii) Container (type tab)
And now is starting the problem thing.

The first tab contains a checkbox group or separate checkbox options.
The second tab contains the information about the contact person (the customer)
The third tab contains the information about the deceased.

Depending if the customer checks or unchecks an option, a container (type: tab) must appear. (or disappear), So if the customer checks all the options (9 options), there should not be 3 tabs visible, (checkboxes, contactperson and deceased, but 12 containers (type: tab) with on every tab the needed questions or options.

For example, in the options list, customer can check "lying in state", "cortege". If the customer checks, he tell he want us to make photo's on lying in state and of the cortege.

These tab containers should appear so customer can tell us details of how the photo's must be taken. (front view, emotions yes or no, etc)

Is this possible ? I've seen that it's possible to show or hide containers type DIV. But that isn't working for tabs.

I assume i need to use JS scripts, but i'm not a star in JS, or php. (not yet, working on it !)
GreyHead 16 Mar, 2015
Hi sonofsundyata,

I'm not sure if you can do this with Tabs - I've never tried. My best guess is that it would be messy.

You can do it with containers in a 'normal' form layout and hide/show them and their contents depending on form entries. The event handler code makes this fairly easy . . . if input XXX == 'aa' hide this div or show that div.

Bob
This topic is locked and no more replies can be posted.