Given this stack:

WordPress 5.3
GravityForms 2.4.15.6 (paid: common, right?)
Forms: 3rd-Party Integration (free: Link to WordPress plugin page)
Forms: 3rd-Party Inject Results (free: Link to WordPress plugin page)
Zillow GetSearchResults API (free: Link to Zillow API)

I’ve connected to Zillow’s API and received the response contained in this file: Link to 3rd-Party Integration debug text file.

Now that I’ve connected, I am supposed to be able to extract either XML or JSON and replace/overwrite the contents of a given field (input_12) within the originating Gravity Form (or in my case, the confirmation) (visible here: link to Gravity Form) by following the instructions here link to 3rd Party Inject Results instructions on GitHub using a syntax that I simply can’t figure out – something like:

XML

 

[env:Envelope/env:Body/ns1:Response/ns1:Resultstatus] => foo
[env:Envelope/env:Body/ns1:Response/ns1:Result] => bar
[env:Envelope/env:Body/ns1:Response/ns1:Description] => baz

or

JSON
[Body/Response/ResultStatus] => foo
[Body/Response/Result] => bar
[Body/Response/Description] => baz

in the Forms: 3rd-Party Inject Results field shown here: Dropbox screenshot

I am attempting to extract/display the “zestimate” element’s “amount” field, but can’t figure out the correct syntax/response path.

The successful Zillow XML response, along with the field(s) I need to capture can be seen in the text file here link to Zillow XML response

I have searched high and low, but correct syntax/formatting information is scarce on this specific topic/plugin, and I would like to accomplish this in the aforementioned stack, if at all possible.

I would greatly appreciate a guru’s guidance in helping me format the correct syntax so I can get on with my freaking life. lol

Thanks in advance.

 

##########################################

 

he first step is to extract the value with this kind of code, does it work for you ?

 

$xml = simplexml_load_string($result);
$value = (string) $xml->response->results->result->zestimate->amount;

var_export($value, FALSE);