Answers.Body: <p>I don't think there is an easy way to add a new field to the billing address instead of changing the core file. But you could do via custom extension using buildform hook</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-28T19:26:24.557Z
Answers.Text: And how would I integrate that into the Pay Later flow? And get the result of that form into the payments for the participants? Could you expand on your answer, please.
Answers.UserDisplayName: thoni56
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T10:19:22.770Z
Answers.Text: As I said it's not easy, But you can definitely achieve this using hooks rather overriding core. Will need to debug the hook params and add the field accordingly. The data will be stored against the contact however it won't appear on a single screen will need to do few clicks to see the data
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-28T16:09:31.580Z
Answers.LastActivityDate: 2022-06-28T16:09:31.580Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>When I activate pay later and force pay later address input on an event I get some fields displayed.</p>
  <p>How can I add &quot;Company&quot; to those fields?</p>
  <p>I used the hack in <a href="https://civicrm.stackexchange.com/questions/30842/how-to-change-order-in-billing-address">How to change order in billing address</a> to tweak the ordering.</p>
  <p>The return in <code>CRM/Core/Payment/Manual.php</code> looks like this:</p>
  <pre><code>      return [
          'first_name' =&gt; 'billing_first_name',
          'last_name' =&gt; 'billing_last_name',
          'street_address' =&gt; &quot;billing_street_address-{$billingLocationID}&quot;,
          'postal_code' =&gt; &quot;billing_postal_code-{$billingLocationID}&quot;,
          'city' =&gt; &quot;billing_city-{$billingLocationID}&quot;,
          'country' =&gt; &quot;billing_country_id-{$billingLocationID}&quot;,
          'state_province' =&gt; &quot;billing_state_province_id-{$billingLocationID}&quot;,
        ];
  </code></pre>
  <p>I'm not sure what the values in this returned table actually means or how it is used, but I could not find anything like <code>billing_company</code> or <code>billing_organisation</code> when <code>grep</code>-ing the PHP sources.</p>
  <p>Is there a way to add the company information to the &quot;pay later&quot; form?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-28T23:57:29.807Z
Comments.Text: how about 'current_employer'?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-29T06:03:21.673Z
Comments.Text: Adding `'company' => "current_employer"` displays the field, but it does not get saved in  the billing information.
Comments.UserDisplayName: thoni56
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-06-29T06:05:22.023Z
Comments.Text: The billing info should really be a profile, rather than hard-coded: https://lab.civicrm.org/dev/core/-/issues/2761
Comments.UserDisplayName: thoni56
Tags: <fields><paylater>
Title: How can I add Company to billing/pay later fields?
ThreadText: # How can I add Company to billing/pay later fields?
  
  (Asked by: username_0 on 2022-06-28)
  
  When I activate pay later and force pay later address input on an event I get some fields displayed.
  How can I add "Company" to those fields?
  I used the hack in How to change order in billing address to tweak the ordering.
  The return in CRM/Core/Payment/Manual.php looks like this:
        return [
          'first_name' => 'billing_first_name',
          'last_name' => 'billing_last_name',
          'street_address' => "billing_street_address-{$billingLocationID}",
          'postal_code' => "billing_postal_code-{$billingLocationID}",
          'city' => "billing_city-{$billingLocationID}",
          'country' => "billing_country_id-{$billingLocationID}",
          'state_province' => "billing_state_province_id-{$billingLocationID}",
        ];
  
  I'm not sure what the values in this returned table actually means or how it is used, but I could not find anything like billing_company or billing_organisation when grep-ing the PHP sources.
  Is there a way to add the company information to the "pay later" form?
  
  **Tags:** fields, paylater
  
  > **Comments:**
  > **username_1**: how about 'current_employer'?  
  > **username_0**: Adding `'company' => "current_employer"` displays the field, but it does not get saved in  the billing information.  
  > **username_0**: The billing info should really be a profile, rather than hard-coded: https://lab.civicrm.org/dev/core/-/issues/2761  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-06-28. Score: 0
  
  I don't think there is an easy way to add a new field to the billing address instead of changing the core file. But you could do via custom extension using buildform hook
  
  > **Comments:**
  > **username_0**: And how would I integrate that into the Pay Later flow? And get the result of that form into the payments for the participants? Could you expand on your answer, please.  
  > **username_2**: As I said it's not easy, But you can definitely achieve this using hooks rather overriding core. Will need to debug the hook params and add the field accordingly. The data will be stored against the contact however it won't appear on a single screen will need to do few clicks to see the data  
  
  ---
  
  