一点背景信息:
我正在使用重力表单插件,并尝试使用动态自定义确认。然而,所填写的表单有相当多的数据/值变量。然而,我不能使用这些变量。它们根本无法加载。有什么线索吗?请参见下面的代码。
add_filter("gform_confirmation_3", "custom_confirmation", 3, 4 );
function custom_confirmation($confirmation, $form, $lead, $ajax){
if($form["id"] == "3"){
$confirmation = "
<br/>
<center>
<div class=\'confirmationbuild\'>
<h2>Your units will arrive in 6 hours</h2>
You will be redirected in 3 seconds. <br/><br/>
<a class=\'confirmationbutton\' href=\'http://www.**********.nl/infantry\'>
<strong>Click here to be redirected now</strong></a><br/><br/>
<script type=\'text/javascript\'>
setTimeout(function () {
window.location.href=\'http://www.*********.nl/infantry\'; // the redirect goes here
},2000);
</script>
</div>
</center>";
}
else if($form["id"] == "5"){
$confirmation = "Thanks for contacting us. We will get in touch with you soon";
}
return $confirmation;
}