{"id":68671,"date":"2017-05-19T03:57:31","date_gmt":"2017-05-19T03:57:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/forms-3rd-party-inject-results\/"},"modified":"2019-09-06T09:50:21","modified_gmt":"2019-09-06T09:50:21","slug":"forms-3rd-party-inject-results","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/forms-3rd-party-inject-results\/","author":7795090,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.3","stable_tag":"trunk","tested":"5.2.24","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Forms: 3rd-Party Inject Results","header_author":"zaus","header_description":"Attach the results to the original submission","assets_banners_color":"","last_updated":"2019-09-06 09:50:21","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/drzaus.com\/donate","header_plugin_uri":"https:\/\/github.com\/zaus\/forms-3rdparty-inject-results","header_author_uri":"http:\/\/drzaus.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1284,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.3":"<p>Delimiter format handling has changed.  May be a breaking change if you were using it &quot;wrong&quot; (according to how it was previously described).<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[125390,358,1150,361,4605],"plugin_category":[42,49],"plugin_contributors":[80258],"plugin_business_model":[],"class_list":["post-68671","plugin","type-plugin","status-publish","hentry","plugin_tags-3rd-party-service","plugin_tags-contact-form","plugin_tags-crm","plugin_tags-form","plugin_tags-mapping","plugin_category-contact-forms","plugin_category-maps-and-location","plugin_contributors-zaus","plugin_committers-zaus"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/forms-3rd-party-inject-results.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Allows you to include results from a <a href=\"http:\/\/wordpress.org\/plugins\/forms-3rdparty-integration\/\">Forms 3rdparty Integration<\/a> submission by flattening the response and inserting it within the original contact form submission.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip, upload plugin folder to your plugins directory (<code>\/wp-content\/plugins\/<\/code>)<\/li>\n<li>Make sure <a href=\"http:\/\/wordpress.org\/plugins\/forms-3rdparty-integration\/\">Forms 3rdparty Integration<\/a> is installed and settings have been saved at least once.<\/li>\n<li>Activate plugin<\/li>\n<li>In the newly available section \"Inject Results\" in the '3rdparty services' admin, enter the flattened service response keys like <code>Response\/Body\/SomeKey<\/code>, one per line.\na. 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 <code>{ Response: { Body: { SomeKey: \"foobar\" } } }<\/code> and include \"foobar\" with the submission.<\/li>\n<li>Some contact form plugins only allow injecting\/overwriting an existing field (e.g. Gravity Forms).  In these cases you can provide an \"alias\" to overwrite with <code>Response\/Body\/SomeKey=the_alias<\/code>, where <em>the_alias<\/em> is the contact form field to override.\na. With Gravity Forms, fields should be overwritten using aliases like <code>input_X<\/code> where 'X' is the field's id.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How does it add the response values?<\/dt>\n<dd><p>If you have an endpoint <a href=\"http:\/\/yoursite.com\/plugins\/forms-3rdparty-inject-results\/test-response.php\">test-response.php<\/a> that will \"echo\" back your 3rdparty submission with keys altered to be prefixed with 'req-', then if your submission was<\/p>\n\n<pre><code>{ name: { first: \"FirstName\", last: \"LastName\" }, email: \"myemail@email.com\", etc: \"foobar\" }\n<\/code><\/pre>\n\n<p>The response would be flattened and prefixed to<\/p>\n\n<pre><code>{ \"req-name\/first\": \"FirstName\", \"req-name\/last\": \"LastName\", \"req-email\": \"myemail@email.com\", \"req-etc\": \"foobar\" }\n<\/code><\/pre>\n\n<p>You would then inject <code>req-name\/first<\/code> or <code>req-etc<\/code>.<\/p><\/dd>\n<dt>What are some XML\/JSON examples?<\/dt>\n<dd><p><em>XML<\/em><\/p>\n\n<pre><code>[env:Envelope\/env:Body\/ns1:Response\/ns1:Resultstatus] =&gt; foo\n[env:Envelope\/env:Body\/ns1:Response\/ns1:Result] =&gt; bar\n[env:Envelope\/env:Body\/ns1:Response\/ns1:Description] =&gt; baz\n<\/code><\/pre>\n\n<p><em>JSON<\/em><\/p>\n\n<pre><code>[Body\/Response\/ResultStatus] =&gt; foo\n[Body\/Response\/Result] =&gt; bar\n[Body\/Response\/Description] =&gt; baz\n<\/code><\/pre>\n\n<p>Note that XML responses will include the namespace prefixes.  You may then reference them by the entire key shown above.<\/p><\/dd>\n<dt>It doesn't work right...<\/dt>\n<dd><p>Drop an issue at https:\/\/github.com\/zaus\/forms-3rdparty-inject-results<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3<\/h4>\n\n<ul>\n<li>fix: inconsistent nested key delimiters, now expecting '\/'<\/li>\n<li>removed testing endpoint per WP Security request (see archives for example)<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>confirmed with GF at least<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<p>IT HAS BEGUN<\/p>","raw_excerpt":"Injects the response from a Forms: 3rdparty submission into the original contact form.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/68671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=68671"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/zaus"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=68671"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=68671"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=68671"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=68671"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=68671"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=68671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}