Problem

The remote handler is intended to send form data to a remote URL. A typical usage is sending data to an external CRM, issue tracker, ERP, etc. It is currently not possible to capture a return value from the remote handler. This could be useful if the remote handler returns an ID or URL related to the created Customer, Lead, Price Quote, etc. The success message could then become

Your request has been sent. You can consult the status of your request here.

Possible solutions

I think 2 possible solutions seem reasonable:

  • The return value(s) could be exposed as a token(s) in the success message.
  • The return value(s) could be saved as (a) form value(s).

Optionally parsing the return value as json is probably a good idea, but even just one value would solve 95% of the use cases

Comments

mennovdheuvel created an issue. See original summary.

jrockowitz’s picture

I am not exact sure how to we would save the response data with in a webform submission.

For custom remote posts, I have stored the returned data in a $_SESSION variable..

jrockowitz’s picture

So the solution I can up with is to pass response data to submission data using tokens. (ie [webform_handler:remote_post:completed:confirmation_number])

jrockowitz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

arif.zisu’s picture