Answers.Body: <p>This was a bug in commerce and <a href="https://github.com/craftcms/commerce/commit/86761b272c89d2613a843df95cd43858ce02ff91" rel="nofollow noreferrer">it has now been fixed</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-06T22:19:17.693Z
Answers.LastActivityDate: 2019-12-06T22:19:17.693Z
Answers.UserDisplayName: Oli
Body: <p>cart.billingAddress and cart.shippingAddress are both are set to the same address and include custom1 and custom2 fields.</p>
  
  <p>After submitting the order, order.shippingAddress and order.billingAddress have all the correct address information from cart except custom1 and custom2 which are blank.</p>
  
  <p>This is a slightly simplified version of my payment submission form. It's using the manual gateway, no money is taken and the order is set with a status "Payment Pending" and paid status "Unpaid". Invoices are paid elsewhere for now.</p>
  
  <pre><code>&lt;form method="POST"&gt;
  
    {{ csrfInput() }}
  
    {{ redirectInput('/account/invoice?number='~cart.number) }}
    &lt;input type="hidden" name="action" value="commerce/payments/pay"/&gt;
    &lt;input type="hidden" name="gatewayId" value="2"/&gt;
    &lt;input type="hidden" name="savePaymentSource" value="0" /&gt;
  
    &lt;button type="submit" class="button"&gt;Confirm order and generate invoice&lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Why isn't the information in the fields custom1 and custom2 being set on the order addresses?</p>
  
Tags: <plugin-craftcommerce2>
Title: How do I pass custom field contents from cart to order
ThreadText: # How do I pass custom field contents from cart to order
  
  (Asked by: username_0 on 2019-12-05)
  
  cart.billingAddress and cart.shippingAddress are both are set to the same address and include custom1 and custom2 fields.
  
  After submitting the order, order.shippingAddress and order.billingAddress have all the correct address information from cart except custom1 and custom2 which are blank.
  
  This is a slightly simplified version of my payment submission form. It's using the manual gateway, no money is taken and the order is set with a status "Payment Pending" and paid status "Unpaid". Invoices are paid elsewhere for now.
  
  ```
  <form method="POST">
  
    {{ csrfInput() }}
  
    {{ redirectInput('/account/invoice?number='~cart.number) }}
    <input type="hidden" name="action" value="commerce/payments/pay"/>
    <input type="hidden" name="gatewayId" value="2"/>
    <input type="hidden" name="savePaymentSource" value="0" />
  
    <button type="submit" class="button">Confirm order and generate invoice</button>
  
  </form>
  
  ```
  
  Why isn't the information in the fields custom1 and custom2 being set on the order addresses?
  
  **Tags:** plugin-craftcommerce2
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-06. Score: 1 | Accepted answer
  
  This was a bug in commerce and [it has now been fixed](https://github.com/craftcms/commerce/commit/86761b272c89d2613a843df95cd43858ce02ff91).
  
  
  ---
  
  