<input type="text" name="uname" id="uname" value="”
Problem
How to posted data back on to the form after validation failed because every user not fill all the data when a single error is happened i m not going to use any J family
only word press and php core function.
In any php or frame developement we include serside file
include(../process.php);
but in wordpress did not idea how to do it.
any one have any idea how to do it
Yes, you can. There are two methods for doing this.
1) Create a custom template and give the url of that in your action like:
action=”<?php echo site_url(); php?>/thank-you”
2) You can submit the form using the jQuery Ajax and give the thank-you page url there.
If u don’t mind i would like to do all the thing in action it would be possible or not
You can leave the action as blank and add your validation on the same template on which you are making the form.
ok then what is the form [ action ]
In WordPress you can create simple function in functions.php like:
function process(){
//Write your code here.
}
And you can simply call it in your template file where it is required. Like:
$processResults = process();