Auto-Updating Text Field

Currently you have the code only being run at the same time as the page loads itself and so you will need to refresh the page to get this code to rerun itself.

If you want to refresh it when they do the submit, then you can look at adding the refresh to the submit function in your code.

You can see an example in a previous forum post here.
https://www.wix.com/corvid/forum/community-discussion/onclick-submit-data-and-reload-the-page-how-to