“Gravity Forms for WordPress is a full featured contact form plugin that features a drag and drop interface, advanced notification routing, lead capture, conditional logic fields, multi-page forms, pricing calculations and the ability to create posts from external forms.”
There are multiple options how to handle the confirmation page. Gravity form allows you to send query parameters to the page it is redirecting to.
You can send all form information in the clear, via query variables, but that looks really messy. Its better to use something like this .. lead_id={entry_id} and query form information on the actual confirmation page.
This will output the submitted form data as an array, with all fields linked by field id.
$lead = RGFormsModel::get_lead($lead_id);
When you are reusing the field data for your own purposes, its easier to deal with field names than with fields ids. So we get the form meta data
$form = RGFormsModel::get_form_meta( $lead['form_id'] ); foreach( $form['fields'] as $field ) { 'id' => $field['id'], 'label' => $field['label'], 'value' => $lead[ $field['id'] ], ); }
and extend the lead array.
foreach($lead as $key => $val){ $lead[$lead_key] = $val; } }
Before you needed to know the actual field id to get its value. Now you can use the generated lead key to get that value.
$field_key = 10; echo $lead[$field_key];
$field_key = "e-mail"; echo $lead[$field_key];
Much easier to reuse and remember :)
BOOKING SOLUTIONS 202x This is my take on a subset of booking, appointment, PMS or… Read More
THE GOAL Create a system cron for WordPress, that is accessible and can be easily… Read More
2024, what's cooking? Slowly getting into the 2024 spirit. 3 projects coming to a close… Read More
Short look back at 2023 This has been a busy and interesting year. I am… Read More
Elementor Pro provides grid containers as an experimental feature. The options provided are limited, when… Read More
Archaeology Travel is an online travel guide for people who enjoy exploring the world’s pasts.… Read More