first page: The user enters a number and clicks next,
second page: contains several forms equal to the number the user entered it includes basic information third page: contains a stripe payment
My application logic involves taking this data and constructing an XML file to submit to some API when I get the last entry to parse and extract data using the attached code:
function forminator_form_after_save_entry( $form_id, $response ) {
if( $response['success'] and $form_id == 6080 ){
$entry = Forminator_Form_Entry_Model::get_latest_entry_by_form_id( 6080 );
error_log("XXX3:".print_r($entry, true));
error_log("XXX2:".print_r($_POST, true));
}
}
I get the following output:
[16-Nov-2024 14:07:16 UTC] XXX3:Forminator_Form_Entry_Model Object
(
[entry_id] => 6
[entry_type] => custom-forms
[form_id] => 6080
[draft_id] =>
[is_spam] => 0
[date_created_sql] => 2024-11-16 14:07:14
[date_created] => 16 Nov 2024
[time_created] => Nov 16, 2024 @ 2:07 PM
[meta_data] => Array
(
[number-1] => Array
(
[id] => 44
[value] => 3
)
[name-1] => Array
(
[id] => 45
[value] => Array
(
[prefix] => Miss
[first-name] => Rebecca
[middle-name] => Joelle Clarke
[last-name] => Alford
)
)
[name-1-2] => Array
(
[id] => 46
[value] => Array
(
[prefix] => Mr
[first-name] => Sacha
[middle-name] => Josiah Ewing
[last-name] => Hayden
)
)
[name-1-3] => Array
(
[id] => 47
[value] => Array
(
[prefix] => Mr
[first-name] => Jada
[middle-name] => Cassady Powers
[last-name] => Mueller
)
)
[select-1] => Array
(
[id] => 48
[value] => Option 2
)
[select-1-2] => Array
(
[id] => 49
[value] => Option 2
)
[select-1-3] => Array
(
[id] => 50
[value] => Option 2
)
[_forminator_user_ip] => Array
(
[id] => 51
[value] => 127.0.0.1
)
[stripe-1] => Array
(
[id] => 52
[value] => Array
(
[mode] => test
[product_name] => Plan 1
[payment_type] => One Time
[amount] => 35.00
[quantity] => 1
[currency] => USD
[transaction_id] => pi_3QLmeb2Lte7nQQ6y1fZ1OP6y
[transaction_link] => https://dashboard.stripe.com/test/payments/pi_3QLmeb2Lte7nQQ6y1fZ1OP6y
[status] => COMPLETED
)
)
)
[table_name:protected] => wp_frmt_form_entry
[table_meta_name:protected] => wp_frmt_form_entry_meta
)
This makes it very hard to parse with complex logic, is there a way to get a better format? or i should build my own transformer?
Ideally, I want:
number user enter,
array of entries
strip related stuff
I’m trying to create a form with redirection and field parameters to send to another form.
I use Contact Form 7 – Repeatable Fields for fields that need to be repeated if user want.
Likewise, I need to make a function that creates fields in form on a second page and automatically get parameters from URL. Is this possible?
]]>Would it be possible to support repeatable fields and map it to an array in the json request?
https://www.ads-software.com/plugins/cf7-repeatable-fields/
]]>Thanks
]]>How can I display pods repeatable fields in Elementor?
Thank you.
]]>I am interested to create a form where the user can upload one or more files, but also saying what each file contains. So he adds a file, and 2 details for it. If he want to add another, he clicks on “add another file”, where he has the same field for file and the 2 details. Is this possible to be made with the addon?
Its like a multiple file upload, but each file with own details. Or as a workaround, can the conditional logic detect if one or more files are uploaded and display fields for each of the files?
Thanks, Stefan
]]>CF7 addons work differently and each one uses one strategy to map the inputs. If it just gets all sent values, the answer will be YES, otherwise, if it checks if an input really exists on the form settings, probably it won’t work as you needed.
So can you help me if there is way to save dinamically added fields (after the form is loaded)?
Thank You!