Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter("gform_field_value_singlelinetext", "populate_singlelinetext");
- function populate_singlelinetext($value)
- {
- // Use the REQUESTED PHP variables to lookup the appropriate information
- global $wpdb;
- $form_data = $wpdb->get_results("SELECT * FROM wp_rg_lead_detail WHERE form_id = '".$_REQUEST['form_id']."' AND lead_id = '".$_REQUEST['entry_id']."'");
- $my_count = 0;
- //Loop through array to pick out first name field of 1.3
- foreach($form_data["fields"] as &$field)
- if($field["field_number"] == '1.3')
- {
- $my_count++;
- $my_field =$field['value'];
- }
- echo '<pre>'; print_r($form_data); echo '</pre>';
- return $my_field;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement