How can I add a new component to the page by tapping a button dynamically using “Add logic”?
Hi, components have a “Visible” property on the “Advanced” tab that you can use to toggle their visibility. To control this from another component, you can
- create a true/false type page variable with initial value
- bind that to the component’s Visible field
- then use “Set page variable” to set the page variable to
trueafter “Component tap” of the button
Thanks for the prompt answer.
This solution that you are proposing means that any new component should be created while designing the GUI. But the number of components to be created is not known or set in the beginning. So I want to be able to create them in the runtime.
Is this possible in AppGyver?
Hi, you can for example repeat an arbitrary number of components, but the “base” component has to be created in the editor for it to be able to be created at runtime.
Here’s a thread where there’s an example of repeating
n form fields based on user input:
Thanks @Mari I’ll check it.