wordpress gravity forms submit multiple times

为君一笑 提交于 2019-12-13 01:02:28

问题


I am using Gravity Forms with easy modal to allow the user to build an email distribution list for blog posts.

I have it all wired up and working perfectly aside from the fact that I can't figure out how to completely disable the confirmation page after the form is submitted.

The effect that I am looking for is that the user can enter an email address, submit the form (via ajax), and then have the form redraw so that a 2nd, 3rd, etc.. email address can be entered. Right now I have to completely reload the page to get the form out of the "submitted" state.


回答1:


I've written a plugin which allows you to reload any AJAX-enabled Gravity form.

http://gravitywiz.com/documentation/gp-reload-form/

In the demo, you click a link to reload the form; however, it also provides an option to automatically reload the form after X seconds. Additionally, you can trigger the reload manually (like when the popup containing the form is closed) anywhere in your javascript like so:

gwrf.reloadForm();

This plugin works by saving a copy of the form HTML when the form is loaded and then when called to reload the form, it replaces the confirmation markup with the save HTML markup.



来源:https://stackoverflow.com/questions/21299380/wordpress-gravity-forms-submit-multiple-times

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!