Hi!
Is there a way to dynamically create an element - I mean not just show/hide it? For instance, in order to display an unanticipated number of shapes or inputs based on a user input?
Thanks for your help
Create a dB data type call it āelementā
Build an rg with the element you want inside an rg row group that you will use to establish conditions
Set the content to āelementā and the data source to a search for elements
You need a trigger. For this example letās add a button outside of the rg. Set it to create a dB element upon being clicked.
The above is super basic I know, but hopefully it sparks some ideas.
Thanks for the idea! I already tried something like that but Iām lost when trying to configure the size and positioning of the RG. Especially since, in an ideal world, I would have loved to have different element sizes and positions in each āsquareā. I was thinking maybe thereās a way to ācallā a Bubble element using a (simple) javascript?
Iāve done something similar in the past, this app can automatically generate a population visualization using bubble.
Each time you add population it shows a dynamic shape based on the number of population added to each area of the map.
Try it yourself: https://wrld897235-34.bubbleapps.io/version-test
And then check the editor: https://bubble.io/page?name=index&id=wrld897235-34&tab=tabs-1
Itās not a nice solution but everything is possible with bubble.
There is even a time-lapse feature that shows how the population has evolved overtime.
Interesting indeed (and well done!) but, if Iām not mistaking, this is still dynamic show/hide where you have to anticipate in the condition tab all possible outcomes on the page? In the case of the app Iāve got in mind, that would mean the programming of tens if not hundreds of situations - way too fastidious to build and maintain error-freeā¦ But thanks for the inspiration!
Using repeating groups and underlying data you arenāt hiding and showing it.
So basically if you want a dynamic amount of inputs then you build a repeating group with a single piece of input.
Then you create a data type called āInputsā and then you create a button that will create a new āInputā data and then the repeating group will show a new input field every time you click the button. This is pretty dynamic imo.
Youāre right and I can see how it works fine in order to display an expanding view of identical elements like your green dots. But thatās not exactly what I want. And if itās not possible to make the app create an element on the fly (something like ābuild X shapes/textboxes/inputs of these sizes and put them at these coordinatesā), that means I probably have to rethink my project and find a more practical logic to anticipate the user inputā¦
There is a plugin to move elements to any coordinates but youād likely have to create the shapes and inputs manually.
This topic was automatically closed after 70 days. New replies are no longer allowed.