Hi, I’m a long time PHP dev but first time WordPress custom theme and plugin dev and I’m struggling to work out something that’s probably simple:
I’m posting a custom form and using a function to process the contents of the form, it’s posting using admin-post.php and an admin\_post\_nopriv\_{action}, it’s running the function OK but how do I get WordPress to re-show the same form if my validation fails?
So I want to post the form, check the fields, if there’s a problem, re-show the form where I can then show a list of the problem(s) and put the variables into the form so the user can edit their input.
Thank you.
[ad_2]