F
by zaus, leadlogic
5 (2 reviews)
Forms: 3rd-Party Xml Post
Converts submission from Forms 3rdparty Integration to xml/json, add headers, or nest fields.
Tested up to WP 4.9 (Current: 6.9)
vtrunk
Current Version vtrunk
Updated 7 years ago
Last Update on 17 Jul, 2018
Synced 17 hours ago
Last Synced on
Rank
#13,003
+31 this week
Active Installs
200+
—
No change
KW Avg Position
N/A
—
No change
Downloads
7.9K
—
Total downloads
Support Resolved
0%
—
No change
Rating
100%
Review 5 out of 5
5
(2 reviews)
Next Milestone 300
200+
300+
1,520
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro
Unlock Exact Install Count
See the precise estimated active installs for this plugin, calculated from real-time ranking data.
- Exact install estimates within tiers
- Track install growth over time
- Milestone progress predictions
Need 82 more installs to reach 300+
Rank Changes
Current
#13,003
Change
Best
#
Downloads Growth
Downloads
Growth
Peak
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
5.0
2 reviews
Overall
100%
5
2
(100%)
4
0
(0%)
3
0
(0%)
2
0
(0%)
1
0
(0%)
Tracked Keywords
Showing 0 of 0| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| No keyword data available yet. | ||||
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- trunk
- Last Updated
- Jul 17, 2018
- Requires WP
- 3.0+
- Tested Up To
- 4.9
- PHP Version
- N/A
- Author
- zaus, leadlogic
Support & Rating
- Rating
- ★ ★ ★ ★ ★ 5
- Reviews
- 2
- Support Threads
- 0
- Resolved
- 0%
Keywords
Upgrade to Pro
Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.
Upgrade NowSimilar Plugins
WP Adminify – White Label WordPress, Admin Menu Editor, Login Customizer
7K+ installs
#2,738
Master Addons For Elementor - White Label, Free Widgets, Hover Effects, Conditions, & Animations
40K+ installs
#930
MW
MW WP Form
200K+ installs
#262
Newsletters, Email Marketing, SMS and Popups by Omnisend
200K+ installs
#279
Crowdsignal Forms
100K+ installs
#306
Frequently Asked Questions
Common questions about Forms: 3rd-Party Xml Post
Unzip, upload plugin folder to your plugins directory (/wp-content/plugins/)
Make sure Contact Form 7 or Gravity Forms is installed
Make sure Forms: 3rdparty Integration is installed
Activate plugin
Go to new admin subpage "3rdparty Services" under the CF7 "Contact" menu or Gravity Forms "Forms" menu and configure services + field mapping.
Configure the new "Xml Post" section to choose which services send as xml and/or determine special headers (given as a url querystring).
Nest fields by separating nodes with /, and indicate attributes with @. Numeric indexes by themselves will result in repetition of the parent element (ex. item/%i/sub could make <item><sub /></item><item><sub /></item>).
I need help
Submit an issue to the GitHub issue tracker in addition to / instead of the WP Support Forums.
How do I add / configure a service?
See "base plugin" Forms: 3rdparty Integration.
How do I set headers
Provide the list of headers as though they were a URL querystring, so that
Content-Type: something
X-Special-Header: something-else
would be given as
Content-Type=something&X-Special-Header=something-else
You may also use shortcodes such as base64 in the header.
How do I nest elements?
Separate element names within the same 3rdparty field mapping using /, so that in order to make:
<credentials type="123">
<user>xyz</user>
<pass>abc</pass>
</credentials>
you would use credentials/@type, credentials/user and credentials/pass, respectively.
Note: You may nest and wrap elements even if not transforming into XML; they will be submitted as multi-dimensional arrays like:
credentials[@type]=123&credentials[user]=xyz&credentials[pass]=abc
Make sure Contact Form 7 or Gravity Forms is installed
Make sure Forms: 3rdparty Integration is installed
Activate plugin
Go to new admin subpage "3rdparty Services" under the CF7 "Contact" menu or Gravity Forms "Forms" menu and configure services + field mapping.
Configure the new "Xml Post" section to choose which services send as xml and/or determine special headers (given as a url querystring).
Nest fields by separating nodes with /, and indicate attributes with @. Numeric indexes by themselves will result in repetition of the parent element (ex. item/%i/sub could make <item><sub /></item><item><sub /></item>).
I need help
Submit an issue to the GitHub issue tracker in addition to / instead of the WP Support Forums.
How do I add / configure a service?
See "base plugin" Forms: 3rdparty Integration.
How do I set headers
Provide the list of headers as though they were a URL querystring, so that
Content-Type: something
X-Special-Header: something-else
would be given as
Content-Type=something&X-Special-Header=something-else
You may also use shortcodes such as base64 in the header.
How do I nest elements?
Separate element names within the same 3rdparty field mapping using /, so that in order to make:
<credentials type="123">
<user>xyz</user>
<pass>abc</pass>
</credentials>
you would use credentials/@type, credentials/user and credentials/pass, respectively.
Note: You may nest and wrap elements even if not transforming into XML; they will be submitted as multi-dimensional arrays like:
credentials[@type]=123&credentials[user]=xyz&credentials[pass]=abc
ex) If the post is:
item => array (
0 => value1,
1 => value2,
2 => value3
)
it will result in
<item>value1</item>
<item>value2</item>
<item>value3</item>
You can accomplish this with the Forms-3rdparty separator [%] to place your index appropriately.
How do I set xml prolog attributes?
Just enter the entire root xml in the field, a la http://stackoverflow.com/questions/5992268/simplexml-how-to-correctly-set-encoding-and-xmins
How do I autoclose/not autoclose empty values?
To produce <SomeTag />, make sure the "Autoclose" option is enabled.
To produce <SomeTag></SomeTag>, make sure the "Autoclose" option is unchecked.
How do I completely customize the xml/wrappers/transform?
Use the 'Mask' format, which allows you to specify the result exactly as you want via string replacement (sprintf), or the 'Replace'/'Advanced Replace' format which will replace string tokens ({{3rdparty}}). Useful for complex XML.
The 'Root Element' field will now be treated as a string-replacement mask (a la sprintf for "Mask" or str_replace for "Replace"), so make sure to include the post body with the appropriate placeholder(s) (%s for "Mask", {{3rdparty_Fields}} for "Replace").
For 'Mask' format, each '3rd-Party Field' will also be treated the same, using %s to indicate where the submission value should go.
For 'Replace' format, repeating fields are not handled -- it essentially looks for instances of each "3rd-Party Field" column and replaces it with the corresponding input value.
For 'Advanced Replace' format, it works the same except that repeating fields are handled in one of two ways:
Providing the shortcode [xpost-loop on="repeatingFieldKey" times="a number"]loop content[/xpost-loop] will repeat the loop content either times or for each key in the array repeatingFieldKey (which is your 3rdparty mapped field)
otherwise it will suffix each repeating field key with its index and look for that as a placeholder (e.g. myfield1, myfield2, etc)
item => array (
0 => value1,
1 => value2,
2 => value3
)
it will result in
<item>value1</item>
<item>value2</item>
<item>value3</item>
You can accomplish this with the Forms-3rdparty separator [%] to place your index appropriately.
How do I set xml prolog attributes?
Just enter the entire root xml in the field, a la http://stackoverflow.com/questions/5992268/simplexml-how-to-correctly-set-encoding-and-xmins
How do I autoclose/not autoclose empty values?
To produce <SomeTag />, make sure the "Autoclose" option is enabled.
To produce <SomeTag></SomeTag>, make sure the "Autoclose" option is unchecked.
How do I completely customize the xml/wrappers/transform?
Use the 'Mask' format, which allows you to specify the result exactly as you want via string replacement (sprintf), or the 'Replace'/'Advanced Replace' format which will replace string tokens ({{3rdparty}}). Useful for complex XML.
The 'Root Element' field will now be treated as a string-replacement mask (a la sprintf for "Mask" or str_replace for "Replace"), so make sure to include the post body with the appropriate placeholder(s) (%s for "Mask", {{3rdparty_Fields}} for "Replace").
For 'Mask' format, each '3rd-Party Field' will also be treated the same, using %s to indicate where the submission value should go.
For 'Replace' format, repeating fields are not handled -- it essentially looks for instances of each "3rd-Party Field" column and replaces it with the corresponding input value.
For 'Advanced Replace' format, it works the same except that repeating fields are handled in one of two ways:
Providing the shortcode [xpost-loop on="repeatingFieldKey" times="a number"]loop content[/xpost-loop] will repeat the loop content either times or for each key in the array repeatingFieldKey (which is your 3rdparty mapped field)
otherwise it will suffix each repeating field key with its index and look for that as a placeholder (e.g. myfield1, myfield2, etc)
Source 3rdparty
------ --------
input_1 name
input_2 phone
input_3.1 files\%i\name
input_3.2 files\%i\name
input_3.3 files\%i\name
input_4.1 files\%i\content
input_4.2 files\%i\content
input_4.3 files\%i\content
input_5.1 files\%i\mime
input_5.2 files\%i\mime
input_5.3 files\%i\mime
Normally the input_3.* fields would get grouped together, as would the input_4.* fields. Using separator [%], it will create a nested list like:
array(
'files' => array(
0 => array(
'name' => 'value of input_3.1',
'mime' => 'value of input_5.1',
'content' => 'value of input_4.1' ),
1 => array(
'name' => 'value of input_3.2',
'mime' => 'value of input_5.2',
'content' => 'value of input_4.2' ),
2 => array(
'name' => 'value of input_3.3',
'mime' => 'value of input_5.2',
'content' => 'value of input_4.3' ),
))
With Advanced Replacement, you could set the "Root Elements" field to something like the following (which mimics a normal form upload):
--multipartboundaryPE6azq
Content-Disposition: form-data; name="myNameField"
{{name}}
--multipartboundaryPE6azq
Content-Disposition: form-data; name="myPhoneField"
{{phone}}
[xpost-loop on="files"]--multipartboundaryPE6azq
Content-Disposition: form-data; name="myUploadFiles"; filename="{{name}}"
Content-Type: {{mime}}
{{content}}
[/xpost-loop]
Note the use of the shortcode xpost-loop which will repeat for each of the elements in the nested files array, replacing the placeholders accordingly.
------ --------
input_1 name
input_2 phone
input_3.1 files\%i\name
input_3.2 files\%i\name
input_3.3 files\%i\name
input_4.1 files\%i\content
input_4.2 files\%i\content
input_4.3 files\%i\content
input_5.1 files\%i\mime
input_5.2 files\%i\mime
input_5.3 files\%i\mime
Normally the input_3.* fields would get grouped together, as would the input_4.* fields. Using separator [%], it will create a nested list like:
array(
'files' => array(
0 => array(
'name' => 'value of input_3.1',
'mime' => 'value of input_5.1',
'content' => 'value of input_4.1' ),
1 => array(
'name' => 'value of input_3.2',
'mime' => 'value of input_5.2',
'content' => 'value of input_4.2' ),
2 => array(
'name' => 'value of input_3.3',
'mime' => 'value of input_5.2',
'content' => 'value of input_4.3' ),
))
With Advanced Replacement, you could set the "Root Elements" field to something like the following (which mimics a normal form upload):
--multipartboundaryPE6azq
Content-Disposition: form-data; name="myNameField"
{{name}}
--multipartboundaryPE6azq
Content-Disposition: form-data; name="myPhoneField"
{{phone}}
[xpost-loop on="files"]--multipartboundaryPE6azq
Content-Disposition: form-data; name="myUploadFiles"; filename="{{name}}"
Content-Type: {{mime}}
{{content}}
[/xpost-loop]
Note the use of the shortcode xpost-loop which will repeat for each of the elements in the nested files array, replacing the placeholders accordingly.