I have a form to upload files and when the user uploads the file and click on submit button it will trigger the php code and upload the file. and it will show the message "File Uploaded" .My requirement is Once the user clicks on submit button it should redirect to the homepage and show the success message there.I have installed the "Quick Page/Post Redirect Plugin" but it is always redirecting to the homepage without even clicking on "Submit" button .Is there any other plugin available to do this?
My message is a custom message returned by PHP code.I have added a javascript event like this
<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'homepage url';
}, false );
</script>
but instead of wpcf7mailsent what event I have to add?
wp_redirect
function and add a query argument, which you can check on a home page and if it exists - show a message. Here is a similar answer - wordpress.stackexchange.com/questions/218013/…