【问题标题】:WordPress Formidable Form - Changing a title after form is successfully submittedWordPress 强大的表单 - 成功提交表单后更改标题
【发布时间】:2020-06-10 04:31:16
【问题描述】:

我希望在表单提交成功后更改#contact-title 的内容。如果有人可以提供帮助,将不胜感激。

<p id="contact-title">Feel free to send us a message and we’ll get back to you as soon as we can.</p>
jQuery(document).ready(function($) {
  $(document).on('frmFormComplete', function(event, form, response) {
    var title = $('#contact-title').text('test');
  });
});

【问题讨论】:

  • 表单是否通过 AJAX 提交?如果 not 则 JS 不适合使用。下次使用 PHP 加载页面时,您需要更改文本
  • 否,表单不是通过 AJAX 提交的。强大的文档只展示了如何在 JS 中做到这一点!
  • 你有链接到它声明的文档吗?
  • 这只是我在他们的网站支持页面上看到的内容

标签: jquery html wordpress forms formidable


【解决方案1】:

事实证明,如果您将表单设置更改为“使用 AJAX 提交此表单”,那么它就可以工作。

【讨论】:

    猜你喜欢
    • 2017-11-17
    • 2014-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-29
    • 1970-01-01
    • 2023-03-16
    • 2015-07-26
    相关资源
    最近更新 更多