How can you have a form that doesn’t require the user to be logged in until they click submit, and at that point submits the form if the user is logged in, and otherwise redirects to the login page. Then after the user logs in successfully, submits the original form? The original form has an <input type=”file”> element also, and the file shouldn’t be uploaded unless the user successfully logs in.
Share
It turns out I cannot do what I wanted because it is a security risk to programmatically populate the <input type=file> field and it is not allowed.