Hello, I have a question. I would like to create a page on my website where you can click on button and the description box will appear. The problem is, that I would like to use the same box (the same size, place on page etc…) but clicking on other button, the datas will change. For example:
Button 1 will show the Box 1, where will be e.g. Name: XX, Age: 00,…
Button 2 will show the same BOX 1, but in that box will show: Name: YY, Age: 11,…
It’s kinda like a profile page but without member page / member section…
How should I make it? I know how to hide that box, I just need that data changing and I dont know how should I make it. Is it somehow possible with database or??
Hi! You insert two different text fields into the box. In one Name: XX, Age: 00,… in the other text field Name: YY, Age: 11,… and then you set both to hide or collapse. And then onClick event for the respective button. You connect the respective texts to the field in the collection you want to display. For this you don’t need any code.
I also need whole box hidden and then onClick open something like a profile on one page… Then onClick open another button with same things but diff e.g. name, picture, age etc…
Instead of using normal box —> TRY TO USE → a → LightBOX.
I think you will love it more, if you understand how to grogramm a LIGHTBOX.
I can imagine what you are trying to achieve and the best choice in your case would be a LIGHBOX (for sure).
-
Add a LIGHBOX into your project. Mostly the lighboxes do have some shitty predefined stuff. DELETE all of that —> now you have an EMPTY-LIGHTBOX.
-
Paste all elements you will want to use, like …
a) textBox
b) inputBox
c) repeater
d) dropdown
e) and so on.
You will need just one of each element. The rest will be done by code.
Your Lighbox will open every time you make DATA-CHANGES and you load into the custom-defined LIGHBOX all data you need.
How to work with a LIGHTBOX, you will find here…
https://www.wix.com/velo/reference/wix-window/lightbox
You even can create severak different LIGHTBOXES.