Template Editor- Dynamic Text toolTemplate Editor- Dynamic Text tool

The Dynamic Text tool allows you to insert database fields dynamically into your template. This is useful for displaying personalized data such as names, IDs, and custom values. The appearance, alignment, font, and behavior of the text can be customized to fit design requirements.

Position

The Position properties define the placement and dimensions of an element within the template. Adjusting these values allows you to precisely control where an element appears and how much space it occupies.

  • Left (X) – Specifies the horizontal position of the element, measured from the left edge of the template.
  • Top (Y) – Specifies the vertical position of the element, measured from the top edge of the template.
  • Width – Defines the width of the element, determining how much horizontal space it takes up.
  • Height – Defines the height of the element, determining how much vertical space it occupies.

By adjusting these properties, you can ensure elements are properly aligned and scaled within your design.

Margin

The Margin properties control the spacing around an element, affecting its distance from surrounding elements. Margins help manage layout consistency and improve readability.

  • Left – Adds space to the left of the element, pushing it away from adjacent content.
  • Right – Adds space to the right of the element, maintaining separation from nearby elements.
  • Top – Adds space above the element, ensuring vertical spacing.
  • Bottom – Adds space below the element, creating separation from elements positioned underneath.

Margins can be used to fine-tune spacing and alignment, ensuring a balanced and visually appealing template layout.

Properties

  • Visible

    Determines whether the text is displayed in the badge preview and print output. If unchecked, the text remains in the template but will not be visible or printed.

  • Field

    Selects the database field to be used as the dynamic content source.

  • Input Type

    The Input Type option in the Template Editor allows you to configure how data is entered for Dynamic Fields. This feature provides flexibility by enabling you to choose between free-text input or a custom dropdown menu for specific fields. These settings are essential for tailoring the data input process in Producer to fit your project’s requirements.

    1. Text
      This is the default option. It provides a free-text input field where users can type any value.
    2. Select
      This option creates a custom dropdown menu in Producer. To use this method:

      • Ensure the selected Dynamic Field is of type VARCHAR.
      • Open your project in Template Designer and navigate to the Template Editor section.
      • Click or add a new Dynamic Field in the Template Preview or from the Object Layers list that you want to use as a dropdown.
      • In the Edit Object Properties panel, change the Input Type to “Select.”
      • A text area will appear where you can define the dropdown options. Enter each option on a new line and click Save.
  • Format (Date)

    The Format (Date) allows you to customize how dates are displayed on your templates. This feature is available when the selected Dynamic Field is of type DATETIME or DATE. By defining a specific date format in the Format (Date) field, you can control the appearance of date strings to meet your design requirements.

    With this flexible tool, you can display dates in a variety of styles, from simple numeric formats to more detailed textual representations. For example:

    • d-M-Y20-Jan-1972
    • F d, YSeptember 20, 1972
    • Y-m-d H:i:s1972-01-20 15:01:23
    • jS M Y19th Oct 2023
    • d/m/y19/10/23

    Formatting Options:

    The following options can be used to define the format for displaying dates:

    Formatting Options

    Type Code Description
    Day d Day of the month, two digits (01 to 31)
    D Textual representation of a day, three letters (Mon to Sun)
    j Day of the month without leading zeros (1 to 31)
    l Full textual representation of the day (Sunday to Saturday)
    N ISO 8601 numeric representation of the day (1 for Monday to 7 for Sunday)
    S English ordinal suffix for the day (st, nd, rd, th)
    w Numeric representation of the day (0 for Sunday to 6 for Saturday)
    z Day of the year, starting from 0 (0 to 365)
    Week W ISO 8601 week number of the year (e.g., 42 for the 42nd week)
    Month F Full textual representation of a month (January to December)
    m Numeric representation of a month, with leading zeros (01 to 12)
    M Short textual representation of a month, three letters (Jan to Dec)
    n Numeric representation of a month, without leading zeros (1 to 12)
    t Number of days in the given month (28 to 31)
    Year L Leap year indicator (1 for leap year, 0 otherwise)
    o ISO 8601 week-numbering year
    Y Full numeric representation of a year (e.g., 1972, 2023)
    y Two-digit year (e.g., 72, 23)
    Time a Lowercase Ante meridiem or Post meridiem (am, pm)
    A Uppercase Ante meridiem or Post meridiem (AM, PM)
    h 12-hour format of an hour, with leading zeros (01 to 12)
    H 24-hour format of an hour, with leading zeros (00 to 23)
    i Minutes with leading zeros (00 to 59)
    s Seconds with leading zeros (00 to 59)
    u Microseconds (e.g., 654321)
    Timezone e Timezone identifier (e.g., UTC, GMT)
    P Difference to Greenwich time with a colon (+02:00)
    T Timezone abbreviation (e.g., EST, MDT)
    Z Timezone offset in seconds (-43200 to 50400)
  • Add Days to Date

    Adds a number of days to a date selected in the Field. This feature is great for automatically setting an expiration date for a badge. (e.g., Select the field Date Added, enter 14 in the box, and type “Expiration Date” in the Content Prefix. Use the Format (Date) option to specify how the date should appear.) When the badge is printed, it will automatically add 14 days to the Added Date.

  • Content (Text and Shortcodes)

    Defines the text displayed in the field. This can include static text or dynamic shortcodes such as [firstname] and [lastname], which pull data from the database.

    • Fit Text

      Automatically adjusts the font size to fit the available space within the text field.

    • Clip Text

      Truncates the text if it exceeds the defined area, preventing overflow.

    • Wrap Text

      Wraps the text onto multiple lines when it exceeds the width of the text box.

  • Content Prefix

    Allows adding a custom prefix before the dynamic content. Example: ID: before a unique identifier.

  • Content Suffix

    Allows adding a custom suffix after the dynamic content. Example: kg after a weight value.

  • Opacity

    You can adjust the object’s opacity to one of the following levels: None, 25%, 50%, 75%, or 90%, allowing for semi-transparency effects.

  • Font

    • Font Name

      Specifies the font to be used.

    • Font Color

      Defines the color of the text using a hex code. Example: #004F23 (Dark Green).

    • Font Size

      Sets the size of the text in points (pt). Example: 13.00.

    • Font Style

      Allows applying styles such as Regular, Bold, Extra Bold, Italic, Underlined, or Line-through.

    • Font Case Style

      Determines capitalization format: None, UPPER CASE, lower case, or Title Case.

  • Fill Color

    Defines the background color of the text box.

    Tip: Use this instead of a square behind the text, and adjust the position using Horizontal, Vertical, and Margin settings.