Answers.Body: <p>Unfortunately you cannot control billing block fields through UI. There is no such settings since this fields are mandatory for some(infact many) payment processors. This fields are hard coded at <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L869" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L869</a></p>
  
  <p>You can use <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/" rel="nofollow noreferrer">buildform</a> hook to remove the second name field. </p>
  
  <blockquote>
    <p>Note: You might get error from some payment processor if second name
    is empty</p>
  </blockquote>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T13:07:48.000Z
Answers.Text: I could uncheck the billing and put the fields chosen by me to ask who to send the invoice...
Answers.UserDisplayName: simonetta officinecollegate
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-30T10:57:02.347Z
Answers.Text: I saw that I can uncheck, so the pre-filled form with the billing fields does not appear: in Contributions> Manage Contribution Pages> Configure Page> Amounts> billing address required ... "Check this box later option to provide billing name and address "  -  In this way, I can put a form with fields chosen by me, for billing  -  Thanks Pradeep; for your NOTE: You might get error from some payment processor if second name is empty...
  I tried with the empty field "second name", I had no problems, thanks
Answers.UserDisplayName: simonetta officinecollegate
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T12:53:41.633Z
Answers.LastActivityDate: 2018-06-27T12:53:41.633Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>You can hide the field with CSS, can't you?</p>
  <p>Or comment this out in CRM/Core/BillingBlock.tpl:</p>
  <pre><code>  if ($('#middle_name').length)
      input_ids['#middle_name'] = '#billing_middle_name';
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-20T18:24:34.053Z
Answers.LastActivityDate: 2024-03-20T18:24:34.053Z
Answers.UserDisplayName: wintermoor
Body: <p>How to remove the "Second name" field in the billing form, I can not find the path to reach this form and modify it. Thanks</p>
  
Tags: <forms><billingblock>
Title: Form for billing information
ThreadText: # Form for billing information
  
  (Asked by: username_0 on 2018-06-27)
  
  How to remove the "Second name" field in the billing form, I can not find the path to reach this form and modify it. Thanks
  
  **Tags:** forms, billingblock
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-27. Score: 0 | Accepted answer
  
  Unfortunately you cannot control billing block fields through UI. There is no such settings since this fields are mandatory for some(infact many) payment processors. This fields are hard coded at <https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L869>
  
  You can use [buildform](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) hook to remove the second name field.
  
  > Note: You might get error from some payment processor if second name
  > is empty
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: I could uncheck the billing and put the fields chosen by me to ask who to send the invoice...  
  > **username_0**: I saw that I can uncheck, so the pre-filled form with the billing fields does not appear: in Contributions> Manage Contribution Pages> Configure Page> Amounts> billing address required ... "Check this box later option to provide billing name and address "  -  In this way, I can put a form with fields chosen by me, for billing  -  Thanks username_1; for your NOTE: You might get error from some payment processor if second name is empty... I tried with the empty field "second name", I had no problems, thanks  
  
  ---
  
  ### Answer by username_2 on 2024-03-20. Score: 0
  
  You can hide the field with CSS, can't you?
  
  Or comment this out in CRM/Core/BillingBlock.tpl:
  
  ```
    if ($('#middle_name').length)
      input_ids['#middle_name'] = '#billing_middle_name';
  
  ```
  
  
  ---
  
  