Inserting a bullet or character between 2 values in ezMerge - MKB 0089


    On a card where you have multiple pieces of information that are optional but need to be separated by bullets no matter what is chosen use this script.

    For instance if you have: Telephone • Cell • Fax
    With the normal method a bullet must either follow Telephone or come before Cell, this is a more advanced method prevents that.

    This knowledge base article assumes you have a very good understanding of how ezMerge Templates work with Job Forms. If you need assistance please contact support at 866-770-7561 or open a support ticket and reference this MKB article.




    To automatically place a character between 2 values, follow the directions below.


    1. You'll need to add a SCRIPT field to your Job Form.

      Image - B
    2. Name the Script field something logical like "BulletPointAdder". The customer will not see this name.
    3. You must have a PDFlib textline block on your PDF that will hold the special character. In this example we name the PDFLib textline block "Bullet". Make sure to mark the field as "hidden" on your ezMerge template.

      Image - C
    4. In the Script below you'll see references such as "udf_BusCard\\:Bullet". The "udf_BusCard" portion comes from the field name on your Job Form. See Image B above. The "Bullet" portion comes from the name of the field on the ezMerge template. See Image C above. Both of those names will need to be updated depending on the field names you use on your Job Form and ezMerge Template.
    5. The script checks to make sure that both values are present before inserting the desired character between them. In the example below, it puts a bullet (\u2022) in between the 2 values. If the proof uses something different, for instance a slash, you can just replace \u2022 with a "/" (without the quotes).
    6. <script type="text/javascript">
      function CopyText() {
      if ($('#udf_BusCard\\:Tell').val() != '' && $('#udf_BusCard\\:Cell').val() != '')
      $('#udf_BusCard\\:Tell').bind('change', function(e) { CopyText(); });
      $('#udf_BusCard\\:Cell').bind('change', function(e) { CopyText(); });

    Need something different than a bullet point?

    Use this table to find the character you need and replace u2022 in the code above with the corresponding code you find in the link.


    • Avatar
      Michael Wagner

      Wow, that's complicated! Is there any benefit to doing it this way instead of just entering a bullet in the text area using option-8 on a mac or whatever the alt-code is for pcs? One example where I've used it is to separate an office and fax number. The fax number isn't always used, so I included it along with the bullet in the "optional" tags:

      {Office}<optional> • {Fax}</optional>

    • Avatar
      Adam Witek


      The benefit of doing it this way is that your customer does not have to know about Opt+8 or Alt Codes. Larger scale deployments where there can be 20+, 30+ individuals ordering usually need a more automated approach like we have above.

      Your example works well if you require the user to fill in both an Office and Fax number, however if you do not require both numbers to be filled out, and they only include a fax number, you will get an unwanted bullet point.

    • Avatar
      Michael Wagner

      Ahhh, ok, that makes sense. Good to know!

    Powered by Zendesk