PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

View table in dynamically populated hidden field

  1. Hi,

    I've set up a hidden field in my form that is dynamically populated by the following shortcode in my functions.php file and using the parameter "cart" :

    add_filter('gform_field_value_cart', 'populate_cart');
    function populate_cart($value){
        return do_shortcode("[cart mode="read"]");
    }

    The [cart mode='read'] shortcode is supposed to display a table with the cart's contents (products, prices, total, etc.), but for some reason all of the table formatting is lost in the email.... The cart's contents are all there, but they are all displayed on separate lines and have several blank lines in between items, which creates a very long email that cannot be forwarded to clients.

    Is there any way I can retain the original formatting of the shortcode?

    Thanks,

    Posted 9 years ago on Friday August 3, 2012 | Permalink
  2. It sounds like that's a Cart66 shortcode. Is the email from Cart66 or Gravity Forms? Please provide more information on where this cart shortcode comes from and where you're trying to use it. If it's an issue with the Cart66 shortcode, or other plugin's shortcode, we'll have to ask you to contact that plugin author for support. Thank you.

    Posted 9 years ago on Monday August 6, 2012 | Permalink
  3. Hi Chris,
    It is a Cart66 shortcode, but the email is coming from Gravity Forms.
    In an ideal world, I would be using Cart66 with offline payments for my shopping cart, but Cart66 does not allow you to customize the "Checkout" page, and unfortunately there is a lot of other information that I need to gather. So, rather than have the checkout completed by Cart66, I would like to pass the contents of the cart to a hidden field in a Gravity form, which would allow me to collect all of the information that I need. When the user hits "submit", the shopping cart contents and all of the other information in the form are sent to me via Gravity forms.
    The function above works, but I was hoping there would be a way to have the field show up in a nice table format. It seems that the html tags are lost somewhere along the way.
    Hope this explains more, let me know if you need any further information.
    Thanks in advance.

    Posted 9 years ago on Tuesday August 7, 2012 | Permalink
  4. Is there a place I can submit the form without cost, so I can receive a notification and see what's wrong with it? Or can you submit a test with my email chris@rocketgenius.com so that I can see the email first hand? Screenshots will be of limited value but maybe we'll be able to tell something from them if you can post a screenshot of the notification with the poor layout. Thank you.

    Posted 9 years ago on Tuesday August 7, 2012 | Permalink