views:

10

answers:

1

I have 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!

A: 

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).

thinkswan