【问题标题】:How to create a pop up confirmation message with gravity form?如何使用重力形式创建弹出确认消息?
【发布时间】:2014-12-20 09:31:48
【问题描述】:

是否有人尝试以重力形式创建弹出确认消息。另外我想防止表单在提交后隐藏。

顺便说一句,在我的重力表单确认类型设置中,我选择了文本,因为我不想重定向到任何其他页面,而只想显示一个弹出确认文本。

【问题讨论】:

    标签: javascript jquery ajax forms gravity-forms-plugin


    【解决方案1】:

    这是提交后保持页面焦点的唯一方法! 输入/按钮type="submit" 总是重置页面!

    您必须使用type="button" 作为表单提交按钮,而不是type="submit"

    然后,使用小 jquery/javascript 代码来显示警报框:

    $(document).ready(function(){
    $("ID_or_CLASS_of_your_Button").click(function(){
    //Your tasks performed when the button is clicked!Use AJAX to get your "input" values!
    alert("Input confirmed!");
    });
    });
    

    【讨论】:

      猜你喜欢
      • 2022-10-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-31
      • 2017-05-13
      • 1970-01-01
      相关资源
      最近更新 更多