Answers.Body: <p>It's not very strait forward, but here are the steps needs, (credit to <a href="http://kasuwade.ca/" rel="nofollow noreferrer">Kasia Wakarecy</a>) as commented in the old CiviCRM forum (<a href="https://forum.civicrm.org/index.php?topic=35420.0" rel="nofollow noreferrer">https://forum.civicrm.org/index.php?topic=35420.0</a>):</p>
  
  <p>The new badge templates can be added through Administer > System Settings > Option Groups > Name Badge Format. That interface only allows to enter the new badge name and a description but no info about the layout. To actually tell CiviCRM some details about that badge layout, direct database update is required to add that value:</p>
  
  <ol>
  <li><p>To know which value to update in the database, run first this query:<br>
  <code>SELECT id FROM</code>civicrm_option_value<code>WHERE name = "Avery 5392"</code><br>
  where "Avery 5392" is the name of the new badge layout you just added. The result is going to be like id = 847.</p></li>
  <li><p>Enter the layout details for that badge into the DB using this query:<br>
  <code>UPDATE civicrm_option_value
  SET value = '{"name":"Avery 5392","paper-size":"letter","metric":"mm","lMargin":2,"tMargin":25.4,"NX":2,"NY":3,"SpaceX":0,"SpaceY":0,"width":101.6,"height":76.2,"font-size":12,"orientation":"portrait","font-name":"helvetica","font-style":"","lPadding":3,"tPadding":3}' WHERE `civicrm_option_value`.`id` = 847;
  </code></p></li>
  </ol>
  
  <p>Update the id = 847 with the id number from the first query.</p>
  
  <p>The fields above mean:</p>
  
  <pre><code>'name' =&gt; '5395' // name of label
  'paper-size' =&gt; 'a4' // paper size
  'metric' =&gt; 'mm' // units
  'lMargin' =&gt; 15 // left margin in mm (because metric = mm)
  'tMargin' =&gt; 26 // top margin in mm (because metric = mm)
  'NX' =&gt; 2 // number of items in x (left to right) direction
  'NY' =&gt; 4 // number of items in y (top to bottom) direction
  'SpaceX' =&gt; 10 // spacing between items in x (left to right) direction in mm (because metric = mm)
  'SpaceY' =&gt; 5 // spacing between items in y (top to bottom) direction in mm (because metric = mm)
  'width' =&gt; 83 // width of one item in mm (because metric = mm)
  'height' =&gt; 57 // height of one item in mm (because metric = mm)
  'font-size' =&gt; 12 // font size
  'lPadding' =&gt; 3 // left padding in mm (because metric = mm)
  'tPadding =&gt; 3 // top padding in mm (because metric = mm)
  </code></pre>
  
  <ol start="3">
  <li>Now, that new layout/template is available when adding new Event Badge Layouts (civicrm/admin/badgelayout?reset=1&amp;action=browse)</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T19:22:24.477Z
Answers.Text: nice find. do you want to copy the crux of it over here so that your Answer becomes the 'go to' place?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T23:30:08.820Z
Answers.Text: Nice idea, here you are.
Answers.UserDisplayName: diegov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T15:18:30.187Z
Answers.Text: Has anyone used this in CiviCRM 4.7? Doesn't seem to work for me.
Answers.UserDisplayName: bgm
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T15:43:02.307Z
Answers.Text: Going through /civicrm/admin/labelFormats seems to work (although I had to change the option_group_id manually, to set it in the right group).
Answers.UserDisplayName: bgm
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T13:19:41.847Z
Answers.LastActivityDate: 2017-08-22T15:10:41.587Z
Answers.LastEditDate: 2017-08-22T15:10:41.587Z
Answers.UserDisplayName: diegov
Answers.Body: <p>There is an even simpler way to add a name badge format. Just create a normal mailing label format and then copy it to a new name badge format.</p>
  <ol>
  <li>Go to Administer - Communications - Label Formats</li>
  <li>Add a label format with all the dimensions you need for your name badges and save.</li>
  <li>Go to Administer - System Settings - Option Groups and select Edit Options for Mailing Label Format.</li>
  <li>Copy the value of the new label format you just created.</li>
  <li>Return to Option Groups, but this time select Edit Options for Name Badge Format.</li>
  <li>Add a new Name Badge Format, paste in the value and add a name.</li>
  <li>You can now go back to Administer - Communications - Label Formats and delete the label you created as it was just temporary to copy.</li>
  <li>Now go to Admin - CiviEvent - Event Name Badge Layout to set up your the fields on your name badges.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-15T01:21:25.123Z
Answers.LastActivityDate: 2022-12-15T01:21:25.123Z
Answers.UserDisplayName: Lars SG
Answers.Body: <p>We're using 4.7.8 and can do this without having to enter it directly into the database. </p>
  
  <p>If you go to Administer > System Settings > Option Groups > Name Badge Format and add a new name badge format you can enter the values you want in the value field. eg {"paper-size":"a4","orientation":"portrait","font-name":"times","font-size":6,"font-style":"","NX":2,"NY":4,"metric":"mm","lMargin":6,"tMargin":19,"SpaceX":0,"SpaceY":0,"width":100,"height":65,"lPadding":0,"tPadding":0}</p>
  
  <p>Then you can adjust those details for your requirements and the settings will be available for your badge layouts.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-02T05:13:35.903Z
Answers.Text: i think there is an extra bit of the answer that may help others, namely then setting up the event badge via Admin > CiviEvent> Event Name Badge Layout at /civicrm/admin/badgelayout?action=update&id=1&reset=1
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-22T07:05:36.227Z
Answers.LastActivityDate: 2016-08-22T07:05:36.227Z
Answers.UserDisplayName: joewickert
Body: <p>Civi offers four default Event Name Badges, but we need something different (same size as an Avery L4727 label). 
  Can anyone direct me to how to add a custom name badge? We're using Civi 4.6.15.</p>
  
  <p>Thanks</p>
  
Tags: <civievent>
Title: How do I add a custom Name Badge?
ThreadText: # How do I add a custom Name Badge?
  
  (Asked by: username_0 on 2016-04-18)
  
  Civi offers four default Event Name Badges, but we need something different (same size as an Avery L4727 label).
  Can anyone direct me to how to add a custom name badge? We're using Civi 4.6.15.
  
  Thanks
  
  **Tags:** civievent
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_5 on 2016-08-22. Score: 3 | Accepted answer
  
  We're using 4.7.8 and can do this without having to enter it directly into the database.
  
  If you go to Administer > System Settings > Option Groups > Name Badge Format and add a new name badge format you can enter the values you want in the value field. eg {"paper-size":"a4","orientation":"portrait","font-name":"times","font-size":6,"font-style":"","NX":2,"NY":4,"metric":"mm","lMargin":6,"tMargin":19,"SpaceX":0,"SpaceY":0,"width":100,"height":65,"lPadding":0,"tPadding":0}
  
  Then you can adjust those details for your requirements and the settings will be available for your badge layouts.
  
  > **Comments:**
  > **username_2**: i think there is an extra bit of the answer that may help others, namely then setting up the event badge via Admin > CiviEvent> Event Name Badge Layout at /civicrm/admin/badgelayout?action=update&id=1&reset=1  
  
  ---
  
  ### Answer by username_1 on 2016-04-18. Score: 6
  
  It's not very strait forward, but here are the steps needs, (credit to [Kasia Wakarecy](http://kasuwade.ca/)) as commented in the old CiviCRM forum (<https://forum.civicrm.org/index.php?topic=35420.0>):
  
  The new badge templates can be added through Administer > System Settings > Option Groups > Name Badge Format. That interface only allows to enter the new badge name and a description but no info about the layout. To actually tell CiviCRM some details about that badge layout, direct database update is required to add that value:
  
  1. To know which value to update in the database, run first this query:  
     `SELECT id FROM`civicrm\_option\_value`WHERE name = "Avery 5392"`  
     where "Avery 5392" is the name of the new badge layout you just added. The result is going to be like id = 847.
  2. Enter the layout details for that badge into the DB using this query:  
     `UPDATE civicrm_option_value
     SET value = '{"name":"Avery 5392","paper-size":"letter","metric":"mm","lMargin":2,"tMargin":25.4,"NX":2,"NY":3,"SpaceX":0,"SpaceY":0,"width":101.6,"height":76.2,"font-size":12,"orientation":"portrait","font-name":"helvetica","font-style":"","lPadding":3,"tPadding":3}' WHERE `civicrm_option_value`.`id` = 847;`
  
  Update the id = 847 with the id number from the first query.
  
  The fields above mean:
  
  ```
  'name' => '5395' // name of label
  'paper-size' => 'a4' // paper size
  'metric' => 'mm' // units
  'lMargin' => 15 // left margin in mm (because metric = mm)
  'tMargin' => 26 // top margin in mm (because metric = mm)
  'NX' => 2 // number of items in x (left to right) direction
  'NY' => 4 // number of items in y (top to bottom) direction
  'SpaceX' => 10 // spacing between items in x (left to right) direction in mm (because metric = mm)
  'SpaceY' => 5 // spacing between items in y (top to bottom) direction in mm (because metric = mm)
  'width' => 83 // width of one item in mm (because metric = mm)
  'height' => 57 // height of one item in mm (because metric = mm)
  'font-size' => 12 // font size
  'lPadding' => 3 // left padding in mm (because metric = mm)
  'tPadding => 3 // top padding in mm (because metric = mm)
  
  ```
  
  3. Now, that new layout/template is available when adding new Event Badge Layouts (civicrm/admin/badgelayout?reset=1&action=browse)
  
  > **Comments:**
  > **username_2**: nice find. do you want to copy the crux of it over here so that your Answer becomes the 'go to' place?  
  > **username_1**: Nice idea, here you are.  
  > **username_3**: Has anyone used this in CiviCRM 4.7? Doesn't seem to work for me.  
  > **username_3**: Going through /civicrm/admin/labelFormats seems to work (although I had to change the option_group_id manually, to set it in the right group).  
  
  ---
  
  ### Answer by username_4 on 2022-12-15. Score: 3
  
  There is an even simpler way to add a name badge format. Just create a normal mailing label format and then copy it to a new name badge format.
  
  1. Go to Administer - Communications - Label Formats
  2. Add a label format with all the dimensions you need for your name badges and save.
  3. Go to Administer - System Settings - Option Groups and select Edit Options for Mailing Label Format.
  4. Copy the value of the new label format you just created.
  5. Return to Option Groups, but this time select Edit Options for Name Badge Format.
  6. Add a new Name Badge Format, paste in the value and add a name.
  7. You can now go back to Administer - Communications - Label Formats and delete the label you created as it was just temporary to copy.
  8. Now go to Admin - CiviEvent - Event Name Badge Layout to set up your the fields on your name badges.
  
  
  ---
  
  