It's quite possible the answer to this question is "no", but hey. I have a Gravity Forms form inside a Wordpress site - after the user has submitted a form, I have a function I'd like to run to go and collect some extra data for it.
I don't actually think the Gravity Forms/Wordpress parts are very relevant to my question, but I know everyone on stackoverflow likes to see some code. :) Inside functions.php I hook my form's "after submission" event using:
add_action("gform_after_submission_15", "gravityforms_collectreportdata", 10, 2);
This function then does the following:
function gravityforms_collectreportdata($entry, $form) {
ScanForMissingData($entry["post_id"]);
}
The problem is that ScanForMissingData takes some time, and the user is left waiting for it to finish before they get the "form submitted" message. Really I don't need the user to wait for this. I'd like to just start it running on the server and let the user get on with stuff. I'd ideally like to do something like:
function gravityforms_collectreportdata($entry, $form) {
StartInBackground(ScanForMissingData, $entry["post_id"]);
}
Or some such. Is this possible in PHP?