开发者 | zaus |
---|---|
更新时间 | 2019年9月6日 17:49 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 5.2.2 |
版权: | GPLv2 or later |
/wp-content/plugins/
)Response/Body/SomeKey
, one per line.
a. If the response is JSON or XML it will scan the elements/keys according to the segments you've entered; in the above example it will look for { Response: { Body: { SomeKey: "foobar" } } }
and include "foobar" with the submission.Response/Body/SomeKey=the_alias
, where the_alias is the contact form field to override.
a. With Gravity Forms, fields should be overwritten using aliases like input_X
where 'X' is the field's id.If you have an endpoint test-response.php that will "echo" back your 3rdparty submission with keys altered to be prefixed with 'req-', then if your submission was
{ name: { first: "FirstName", last: "LastName" }, email: "myemail@email.com", etc: "foobar" }
The response would be flattened and prefixed to
{ "req-name/first": "FirstName", "req-name/last": "LastName", "req-email": "myemail@email.com", "req-etc": "foobar" }
You would then inject req-name/first
or req-etc
.
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 JSON [Body/Response/ResultStatus] => foo [Body/Response/Result] => bar [Body/Response/Description] => baz Note that XML responses will include the namespace prefixes. You may then reference them by the entire key shown above.
Drop an issue at https://github.com/zaus/forms-3rdparty-inject-results