So I have read many posts about dynamically populating fields from GForm to GForm, but I am trying to transfer values from a GForm to a WooCommerce checkout form.
I have done this:
http://www.gravityhelp.com/documentation/page/File:Form-settings-confirmation-redirect.png
which gets me the values passed from the first page with the gravity form to the WooCommerce checkout page. Now I need the WooCommerce fields to grab the values.
I made a simple edit to the woocomerce form array so that I can use a hooked in filter like this:
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// hooked in function - $fields is passed via the filter
function custom_override_checkout_fields( $fields ) {
$fields['billing']['billing_email']['value'] = $value;
return $fields;
}
So, I have data passed via a query string, a function hook, which can post data to the 2nd form... now how can I link the two? I feel like I'm close, but I could be miles away.
Is it possible instead to save out a session variable such as:
$_POST['email_address'];
I could use that in the hook filter for woocommerce.
Any help would be HUGELY appreciated! Thanks!