• Gravity Forms Product Add-ons displays the form inputs in the cart and checkout. I want to display these form fields in the user’s Account page with their orders. I’ve been trying for a couple days and can’t seem to get the right php code put together. How can I do this? Maybe it’s easier than I realize. I’ve tried copying many things from the “gravityforms-product-addons.php” file, but no luck so far.

    I just have one field for each product that I need to display the user’s input from. Obviously, Woocommerce already displays the title of products, so I don’t need help with that. Just figuring out how to call the form’s field.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter barryanders

    (@barryanders)

    I’ve made significant progress, but I still need a little help.

    My code as it stands is like so:

    $form_id = RGFormsModel::get_form_id('Domains');
    $form = GFFormsModel::get_form_meta($form_id);
    $field = GFFormsModel::get_field($form, 1);
    $leads = RGFormsModel::get_leads($form['id']);
    
    foreach($leads as $lead)
    {
        foreach($field as $field_id)
        {
            $value = rgar($lead, (string) $field_id);
            echo $value;
        }
    }

    This returns all entries for the field I want, however, I only want to return the entry that was submitted with that particular product. Help?

    Hey I was wondering if you figured this out? I used your code but two entries omitted instead of one. Good work so far!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help With Gravity Forms Input Fields’ is closed to new replies.