I’ve read this topic and others like it looking for a solution for something that is annoying. Nothing more than that. Everything works as supposed. Just the ghost form appearing after submission is annoying.
What @mathcatsand said in the aforementioned topic makes total sense, and I thought i had it nailed. But no.
As a disclaimer, I must say I’m a newby, with no training in coding. I’m just a curious person, learning as I go.
Anyway, I’m running a Streamlit containerized on WSL running on a Windows 11. The database is a PostgreSQL (local, not in a container).
So this page works as supposed, but not scrolling to top after form submission.
I’ve made some changes in order that it scrolls to top. And this version does, but the dreaded ghost form appears on submitting either the Edit form, either the Add form.
After reading the aforementioned post, I’ve made the necessary changes. This is the resulting version. Indeed the form’s container disappears, but before that the ghost form is visible.
I don’t understand why. Why the first version does not renders the ghost form and the second does. Why the container disappering still allows the ghost.
In sum, is there anything I can do? What can I learn here?
So weird. When I try to go to the link, or if I try to go to your user page, GitHub isn’t being cooperative. I wonder if there is a weird character encoding, or regional block, or…something.
Another thing you might try is @ mentioning me in a comment on the gist in GitHub to see if I can navigate to it through my GitHub alerts. Can you @ my work accout: @sfc-gh-dmatthews
I did not paste the code itself here, because the 3 files sum 600 lines. Not visually nice, I’d say, but I can paste them here.
Anyway, I’ve commented your name at the gist to see if it works. Also, maybe it passed unoticed, the files at the drive are publicly visible (the links above work on a private tab now).
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.