开发者

cForms Plugin Post-Processing

I 开发者_如何学JAVAhave a cForms II contact form set up. It works perfectly if I just want the results emailed to myself (default behavior).

I now have a custom PHP file that will take the POST data from the form and submit it to an external database for me. However, when I set the Alternative Form Action page to this PHP page, clicking the Submit button just causes the form to hang.

How exactly do I pass the form data to my own PHP file while still keeping AJAX enabled (so form validation works)?

Cheers!


Ah, I figured it out!

To do post-processing, you don't redirect the form submission to your own file.

You simply modify the my_cforms_ajax_filter($params) function in the my-functions.php file (in your cForms directory).

This function is executed after form validation and before any data processing takes place (so you can intercept the form data).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜