Closed (fixed)
Project:
YAML Form
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2016 at 21:46 UTC
Updated:
21 Dec 2016 at 21:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gg4 commentedComment #3
gg4 commentedComment #4
gg4 commentedComment #5
gg4 commentedComment #6
jrockowitz commentedI understand the problem but what if the remote server needs to capture some of the submissions meta data like the submission id or user's IP address.
I think we might need to refactor the YamlFormRemotePostHandler to allow the posted elements to be selected. This feature would be similar to how users can select which elements are exported. By default I think only the elements should be posted.
Comment #7
gg4 commentedYea, that is tricky because there is valuable data no longer being sent with this change. My D7 workaround was to create a #hidden or #value element and populate it with token, or to otherwise amend the data in a submit hander.
Unfortunately, the way the current solution works, it is not usable for creating simple forms that connect to services like Salesforce's Webtolead endpoints.
Comment #8
jrockowitz commentedThe below element selection code is reusable so I think it should be relatively easy to add it to the remote post handler.
Comment #9
gg4 commentedOh that's awesome and probably the way to go longterm. We will need to deal with possible key collisions if we are merging data that are now the root level items in
$request_post_datawith those in$request_post_data['data'].Comment #11
jrockowitz commentedBelow a screenshot of the new configuration settings.
Comment #12
jrockowitz commentedComment #13
jrockowitz commentedBy default only the form elements are posted but users now have the option to include any additional meta data.
Comment #15
jrockowitz commentedFixed! Please checkout or download the latest dev release.