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
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI 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..
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedSo the solution I can up with is to pass response data to submission data using tokens. (ie [webform_handler:remote_post:completed:confirmation_number])
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@see #2898424: Improve Remote Post
Comment #6
arif.zisu CreditAttribution: arif.zisu commentedhttps://stackoverflow.com/questions/70080302/how-to-get-remote-post-hand...
Please Provide me the solution