Have a form update another form

Hi, I’m just starting out using Streamlit and have a general question. Is it possible to have a form update another form, but still be able to change the form widgets independently? For example in this blog, it states “Changing the contents of a form in the left column or submitting the left form does not impact the form on the right and vice versa.”, but I want that. Can I have another button in form 1 update the values in form 2? So imagine the dropdowns are text_input widgets and pressing “Update Form 2” would replace the “Select Topping” of Almonds with Vanilla in Form 2.

But after I copy the value across, I can still update Form 2 “Select Topping” and then press Submit 2.

What I am hoping to do is create an App that allows me to easily copy fields between multiple environments (e.g. SQL databases), but adjust values to suit each environment such as append dev, uat, prod onto a value.

Thanks for any pointers.

OK, I’m answering my own question, but I did get this to work using the code here. Store Information Across App Interactions | Session State