Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- 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']."'");
- //Loop through array to pick out first name field of 1.3
- foreach($form_data["fields"] as &$field)
- if($form_data["field_number"] == 1.3)
- {
- $my_field =$field['value'];
- }
- // echo '<pre>'; var_dump($form_data); echo '</pre>';
- return $my_field;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement