Scroll to the Top of Popup On Form Submit

In some situations, you may need to scroll back to the top of your popup when a form is submitted. In this case, we can use the code below to get our desired results.

The global $_POST array key and value in the following code sample will vary based on your form. Replace the values in the sample with the actual array key and value used on your project.

Copy, paste and edit the following code either in your parent or child theme  functions.php file, or use the 'My Custom Functions' plugin

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.