1 回答

TA貢獻1789條經驗 獲得超8個贊
我不得不通過在 after_submission 掛鉤底部回顯一個腳本來執(zhí)行一個非常丑陋的解決方法,該腳本將確認消息保存到變量中。然后將該變量傳遞到瀏覽器的 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 關注
- 174 瀏覽
添加回答
舉報