On line 3 of this code http://pastie.org/1435911 the _1 specifies that the filter will apply only to entries from form one. You can recreate this code multiple times, once for each form on your site.
If you want to do the opposite, and apply it to all forms EXCEPT your contact form, you want to do something like this instead, for the first three lines (please test this before installing it in a production environment):
[php]
add_action('gform_post_submission', 'remove_form_entry', 10, 2);
function remove_form_entry($entry, $form){
// update the 17 here to the ID of the form you
// do NOT want to delete the entries of
// i.e. your contact form
if($form['id'] == 17) {
return;
}
// if this is not form 17, delete the entry
// continue with the original code after this line
global $wpdb;
// etc...
Posted 11 years ago on Monday January 7, 2013 |
Permalink