Support Forum

 
You must be logged in to post
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Changing the DB Table that FORMIDABLE saves to

Information/How to
UserPost

1:30 am
September 4, 2010


Aman

1

I am using FORMIDABLE forms. I want that the values entered in the form fields should be saved to a different special Database table that i have created. can you tell me where to change the code? I mean the location of the code to change.

9:04 am
September 4, 2010


Steph

2

Please take a look at this thread. Thanks.

4:16 am
September 5, 2010


Aman

3

Please explain what "Hooks" are? How do i add an alternate location? thanks

9:38 am
September 7, 2010


Steph

4

You would need to add some code in a new plugin or your theme functions.php. Here's a general example:

add_action('frm_after_create_entry', 'save_somewhere_else' , 25, 2);
function save_somewhere_else($entry_id, $form_id){
if($form_id == 5){ //change 5 to the form id with the info to copy
global $wpdb;
$values = array();
//'name' is a column name, and 25 is the field ID you will need to change
$values['name'] = $_POST['item_meta'][25];
//'description' is a column name, and 26 is the field ID you will need to change
$values['description'] = $_POST['item_meta'][26];
//change wp_table_name to your new table name
$wpdb->insert('wp_table_name', $values);
}
}

Information/How to