Ghost form

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?

Thank you in advance.

It looks like your links are to Google drive and aren’t accessible. Can you link to code in a public GitHub repo or gist?

I’m sorry. I thought I’ve made the files public. They are now.
However, as you sugested, here is a gist

This gist is also 404. Can you make the gist public?

It is public. It is listed as public under my gists (in fact the only gist). I do not see how I can make any more changes to its visibility.

A terça, 22/07/2025, 23:01, Debbie Matthews via Streamlit <notifications@streamlit.discoursemail.com> escreveu:

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.

Can you maybe paste the code here in a codeblock?

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).