Redirect form after submit

Add the onClick values

onClick values

<f0rm target=”_blank” action=”https://website.com/action.php” method=”POST”>
<input type=”hidden” name=”fullname” value=”Sam”>
<input type=”hidden” name=”city” value=”Dubai “>
<input onclick=”window.location.href = ‘https://website.com/my-account’;” type=”submit” value=”Submit request”>
</f0rm>

*replace f0rm with form, I didn’t want the form to render on this website.

Isaac Adams-Hands

Full Stack Developer, Digital Marketer, and InfoSec enthusiast. He received his Bachelor’s Degree from the University of Western Sydney and his Business Diploma from Georgian College before joining various marketing positions in search portals, e-commerce, higher education, and addiction recovery services.

Follow @ twitter

Related posts

CSS order

Here is how to load a WordPress child theme’s CSS after the parent theme’s CSS. The trick here is to add a 1 to the add_action script, illustrated below Functions.php Find and edit this little bit of code in the Functions.php file: This way your Parent’s CSS loads first, and your Child theme will load… Read More

Add a shortcode to add_shortcode in functions.php

This drove me a little crazy one afternoon. I had to add a gravity forms shortcode to a new add_shortcode script in functions.php To accomplish this, I added this to my code: ‘ . do_shortcode($content) . ‘ Here is how it looks in its working example. I work best by watching. Too many people just… Read More