1 回答
TA贡献1789条经验 获得超8个赞
我不得不通过在 after_submission 挂钩底部回显一个脚本来执行一个非常丑陋的解决方法,该脚本将确认消息保存到变量中。然后将该变量传递到浏览器的 localSession。然后在加载页面并将消息显示给用户时获取它。
if (is_numeric($RESPONSE_VAR)) {
$msg = "<h2>Your registration was successful</h2><br><h2>Thanks for contacting us! Check your email, and activate your account..</h2>";
echo "<script>localSession.removeItem('confirmation'); localStorage.setItem('confirmation', '$msg');</script>";
}else{
$msg = "<h2>Sorry something went wrong with your application, please try again. <a href='https://URL/FORM_NAME/'>Go Back</a></h2>";
echo "<script>localSession.removeItem('confirmation'); localStorage.setItem('confirmation', '$msg');</script>";
}
- 1 回答
- 0 关注
- 148 浏览
添加回答
举报