Popup window after upload function

I have this great popup window, and I need to extend the functionality. At this time, the popup is triggered by pressing a button.

However, is it possible to have the popup also display with page load?

Link to my code

Here is a one possible solution for Vanilla JS:

function openModal() {
  modal.style.display = "block";

window.onload = openModal;

Here are some more examples: https://www.w3schools.com/jsref/event_onload.asp

Sorry - I mixed up the threads I was going to post.

The button action is a part of a upload form (4 text inputs, 1 file input) that I need some help with. I have updated the link in my post. The submit button triggers the popup, but need some assurance after the click.

Is there any cool way with Javascript to collect all that form info and show something very simple, just a set of text below: “Form sent” after the “I agree” is clicked on, and if it doesn’t get clicked on - form will not send.