Add input fields dynamically to a container

I have a container which has a couple of fields say a,b,c,d,e
I have a “add +” button, which should replicate the fields a and b right under them.
This has to be done through the onclick trigger on the button and writing js code for that but apparently there is no function called container.appendChild which allows you to add the input fields dynamically by clicking a button. any help?

Hi @RGB,

I couldn’t find anything about it in the docs and we as users are not provided with a “appendToPage” method. The HTML markup doesn’t consist of simple elements like <p>...</p> for a text, but it’s always more complex. There is probably also a lot going on under the hood which checks, manages, etc. these components. Without anything provided by UI Bakery itself, it will be very difficult to achieve cloning or replicating built-in elements.

But maybe, if you want to explain a little more what you are trying to achieve, we can help you in other ways.

Hi @RGB,
I’m afraid we have no methods to add new components dynamically :frowning:

There are a couple of ways how to handle it:

Thank you I was able to do it with a list view!

1 Like