When used in conjunction with zaus/forms-3rdparty-postagain the secondary post resolves before the original post does. If the injection is in both services, it will correctly inject into Gravity Forms (via updating the $_POST
var) in the secondary post but when the original post resolves it reapplies the "original" submission values (which won't include the latest injection) overwriting what it had just changed. Use of the array union operator +
exacerbates the problem because it will replace a non-empty value with an empty value for the same key.
Might want an "overwrite" setting for the plugin? Specifically because GF would typically inject into an empty, hidden field.
// this is the postagain 2ndary service --
29-Mar-2017 05:03:09 UTC] Array
(
[0] => Forms3rdpartyIntegration_Gf
[1] => INJECT
[2] => Array
(
[oldPOST] => Array
(
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_6] =>
[input_7] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
)
)
)
[29-Mar-2017 05:03:09 UTC] Array
(
[0] => Forms3rdpartyIntegration_Gf
[1] => INJECT
[2] => Array
(
[newPOST] => Array
(
[input_7] => ABCDSecond ChoiceEFGH
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_6] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
[Name] => Tester5 Testington5
[Options] => Second Choice
[Email] => [email protected]
[Message] => testing secondary post + inject
[Response Name] =>
[Another Response] =>
[input_4_attach] => http://sandbox.wp/wp-content/uploads/gravity_forms/1-335288f34d4612173e2290cdfffab314/tmp/58db400d46c2f_input_4.docx
[input_4_size] => 28
[input_4_mime] =>
[input_4] => test-resume.docx
)
[newfields] => Array
(
[input_7] => ABCDSecond ChoiceEFGH
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_6] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
[Name] => Tester5 Testington5
[Options] => Second Choice
[Email] => [email protected]
[Message] => testing secondary post + inject
[Response Name] =>
[Another Response] =>
[input_4_attach] => http://sandbox.wp/wp-content/uploads/gravity_forms/1-335288f34d4612173e2290cdfffab314/tmp/58db400d46c2f_input_4.docx
[input_4_size] => 28
[input_4_mime] =>
[input_4] => test-resume.docx
)
)
)
// this is the original service --
[29-Mar-2017 05:03:09 UTC] Array
(
[0] => Forms3rdpartyIntegration_Gf
[1] => INJECT
[2] => Array
(
[oldPOST] => Array
(
[input_7] => ABCDSecond ChoiceEFGH
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_6] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
[Name] => Tester5 Testington5
[Options] => Second Choice
[Email] => [email protected]
[Message] => testing secondary post + inject
[Response Name] =>
[Another Response] =>
[input_4_attach] => http://sandbox.wp/wp-content/uploads/gravity_forms/1-335288f34d4612173e2290cdfffab314/tmp/58db400d46c2f_input_4.docx
[input_4_size] => 28
[input_4_mime] =>
[input_4] => test-resume.docx
)
)
)
[29-Mar-2017 05:03:09 UTC] Array
(
[0] => Forms3rdpartyIntegration_Gf
[1] => INJECT
[2] => Array
(
[newPOST] => Array
(
[input_6] => 1234Tester5 Testington54321
[req-femail] => [email protected]
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_7] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
[Name] => Tester5 Testington5
[Options] => Second Choice
[Email] => [email protected]
[Message] => testing secondary post + inject
[Response Name] =>
[Another Response] =>
[input_4_attach] => http://sandbox.wp/wp-content/uploads/gravity_forms/1-335288f34d4612173e2290cdfffab314/tmp/58db400d46c2f_input_4.docx
[input_4_size] => 28
[input_4_mime] =>
[input_4] => test-resume.docx
)
[newfields] => Array
(
[input_6] => 1234Tester5 Testington54321
[req-femail] => [email protected]
[input_1] => Tester5 Testington5
[input_2] => Second Choice
[input_3] => [email protected]
[MAX_FILE_SIZE] => 2097152
[input_5] => testing secondary post + inject
[input_7] =>
[is_submit_1] => 1
[gform_submit] => 1
[gform_unique_id] =>
[state_1] => WyJbXSIsIjE3MzZjMDM5Nzc1NTc3ZmI5MGIxM2E5MmM5N2QxM2IyIl0=
[gform_target_page_number_1] => 0
[gform_source_page_number_1] => 1
[gform_field_values] =>
[Name] => Tester5 Testington5
[Options] => Second Choice
[Email] => [email protected]
[Message] => testing secondary post + inject
[Response Name] =>
[Another Response] =>
[input_4_attach] => http://sandbox.wp/wp-content/uploads/gravity_forms/1-335288f34d4612173e2290cdfffab314/tmp/58db400d46c2f_input_4.docx
[input_4_size] => 28
[input_4_mime] =>
[input_4] => test-resume.docx
)
)
)