Skip to content

Instantly share code, notes, and snippets.

@gicolek
Created January 14, 2013 12:11
Show Gist options
  • Save gicolek/4529670 to your computer and use it in GitHub Desktop.
Save gicolek/4529670 to your computer and use it in GitHub Desktop.
Gravity Form filters
<?php
static function _modify_gravity_form_lead_detail_table($cat_id) {
global $wpdb;
$lead_details_table_name = RGFormsModel::get_lead_details_table_name();
// get new category name
$new_name = $_POST['name'];
// get db category name
$cat_name = get_cat_name( $cat_id );
// set up data for wpdb update
$data = array(
'value' => $new_name,
);
$where = array(
'value' => $cat_name,
);
$format = array(
'%s',
);
$wpdb->update( $lead_details_table_name, $data, $where, $format );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment