1

I have a "gift message" custom fields setup on the last page of my CartThrob checkout process. Here's my code sample:

{exp:cartthrob:checkout_form return="/checkout/billing/process"}
    <textarea id="gift_message" name="gift_message">
         {if gift_message}
              {gift_message}
         {/if}
    </textarea>
{/exp:cartthrob:checkout_form}

If the order is submitted and there's an error, the "gift message" data isn't retained. How can I force it to save to the CartThrob session?

Anna_MediaGirl
  • 1,120
  • 13
  • 31

1 Answers1

6

With custom data, you have to prefix the names to save to the session:

ie. <textarea id="gift_message" name="custom_data[gift_message]"> You may need to change the conditional to: {if custom_data:gift_message}{custom_data:gift_message}{/if}

Siebird
  • 638
  • 4
  • 13