3rd Party Integration?
-
Thanks Greg!
Is there any way to have the file send to a 3rd party? We send all our Gravity fields to Luxsci.com (with the attached code) for processing and sending, but file uploads are not included. I wonder if your plugin can handle this.
Thanks, GT
/* ------------------------------------ :: luxsci Custom Referral Form ------------------------------------ */ add_action("gform_after_submission_3", "post_to_third_party_2", 10, 2); function post_to_third_party_2($entry, $form) { $post_url = "https://secureform.luxsci.com/perl/post/1....."; $body = array(); $labels = array(); foreach($form["fields"] as &$field) { //see if this is a multi-field, like name or address if (is_array($field["inputs"])) { //loop through inputs foreach($field["inputs"] as &$input) { $label = $input["label"]; $value = $entry[strval($input["id"])]; $labels[$label] = $labels[$label] + 1; $label = ($labels[$label] == 1) ? $label : $label . "[" . $labels[$label] . "]"; $body[ $label ] = $value; } } else { $label = $field["label"]; $value = $entry[$field["id"]]; $labels[$label] = $labels[$label] + 1; $label = ($labels[$label] == 1) ? $label : $label . "[" . $labels[$label] . "]"; $body[ $label ] = $value; } } $request = new WP_Http(); $response = $request->post($post_url, array('body' => $body)); }
https://www.ads-software.com/plugins/gf-upload-to-email-attachment/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘3rd Party Integration?’ is closed to new replies.