How to create new input fields based on button click

Hello there,

I’m creating a simple web app that allows the user to input some arguments to return a config JSON that is used in another process. The issue that I’m facing is that one of the arguments can receive an arbitrary number of inputs. The idea that I had was to create fields with a button and after the user clicked on the button new fields would appear below the one she/he just filled.

It should look like this:

And when the button is activated a new row with the same fields should appear. I’ve tried to use st.session_state and an on_click function with the button, but without success.

Any help would be appreciated!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.