I have a header, a section, and a button located in the header. I wish to hide the section when clicking the button and then making the section reappear when I click the button again. Any suggestions on how to accomplish this? No data is associated with the section.
Check out the docs:
Thank you, bpj.
The procedure outlined in the documentation is exactly what I followed, and it did not work. Now, I discovered the issue. When the article was first published it applies to an earlier version of Wappler. In the newer versions you need to physically go into code mode and edit. I don’t know if it is a bug.
The Button Element:
The instructions lead you to type the following:
When you switch to Code view it looks like this:
The code needs to edited to look like this:
The same conceptual change needs to be applied to the element you are hiding or showing (column in this case). Only then will it work.
Thank you for finding this documentation for me.
It's not necessary to edit in code view. I expect the documentation was created before there was an option to use the ternary operator via the UI. For a while, this option has been available:
.. then:
Having said that, it will often be quicker to enter the code manually, but the current options work very well. If you're not sure what code to enter, or you prefer to create the code visually, you have this option.
I think the tutorial was made before the Design/Code options were added to the UI.
@Teodor, maybe a slight update to this guide is needed?
Glad you got it working.