Show and Hide Containers

Hello everyone,

I am having some troubles understanding Wappler's "basic workflows". I came from Bubble.io, in Bubble you can let's say click on a button and hide some group and show another.

I want to do the same thing in Wappler and I still didn't find how, I want to click on a button and hide a flex container and show another, but when I click on dynamic events I only have a few options, I can only choose a few options. How can I do it?

Thanks

  1. To Show/Hide Modal you have specific actions that are seen on your screenshots
  2. If you wan't to show hide elements on click - I would create an app variable - on click set this value to true- and for all elements that you need to hide - go to Dynamc Events - Hide - when varaible is true
1 Like

Define some variables to control the visibility of each container and use them to control the visibiliy.

Say you have 3 containers
Define 3 variables , say visibility1,visibility2 and visibility3 and set to 1 (visible as default)

Give each container the dynamic attribute "show" as visibilityX == 1 ( where x is the variable number)

This will mean the container is only displayed if the value of the variable is 1.

Then use the dynamic event "on click" to toggle the variable between 1 and 0 which will toggle the visibility of the container.

This can also be done with the toggle component.

2 Likes

Please check the following tutorial:

Thanks Teodor, will I be able to do this with many elements on my page?

Hello Sir,

How do I define those variables? Could you help me?

Thanks

Yes of course, you can setup as many toggles as you need.The toggles can of course be used for switching multiple containers.

1 Like

You do it within the data group

1 Like

Or the Toggle element might be a better fit.

1 Like

Thanks everyone, appreciate it!

Good week for you all!

1 Like