DYNAMIC CHECKBOX

The Dynamic Checkbox widget is a powerful tool that retrieves and displays selected checkbox values from JetEngine and ACF meta fields. It is compatible with both single values and arrays, providing versatile data handling capabilities. The widget can render values in multiple formats, such as plain text, list items, grids, and more. However, it currently does not support Glossary Labels.


Dynamic Checkbox Overview

USAGE & SCOPE

The source type you select determines the scope and context in which the widget can be used. Supported query sources include:

Note: The scope and usage of this widget are inherently tied to the query source. Ensure that the selected source has compatible checkbox data.


Settings Icon

WIDGET SETTINGS

Configuration options for the Dynamic Checkbox widget, allowing for customized output formats and data handling.

  • Query Source: Define the data source for the widget. Options include:
    • JetEngine Listing Grid
    • Current Post
    • Current User
  • Meta Field ID: Specify the meta field ID containing the checkbox values.
  • HTML Tag: Define the HTML tag to wrap around each checkbox value (e.g., <div>, <li>, <span>).
  • Output Format: Determines how the checkbox values are rendered:
    • Plain
    • OL (Ordered List)
    • UL (Unordered List)
    • Flex
    • Grid
  • Icon: Optional icon to display before each checkbox value. (Does not apply to OL/UL formats)
  • Items Gap: Adjust the spacing between each checkbox value.
  • Delimiter: Applicable to Plain Output only. Defines the separator between values.
  • Flex Direction: If using Flex Output, set the flow direction:
    • Row
    • Column
  • Grid Columns: For Grid Output, define the number of columns to display.
  • Order Type: Control the order in which values are displayed:
    • Default
    • Ascending
    • Descending
    • Random
  • Hide if Empty: Prevents output rendering if the source meta field is empty.
  • Fallback: Text to display if no checkbox values are found. (E.g., "No options selected")
  • Advanced Output & Macro Rules: Configure complex output rules, conditional rendering, and custom styles.

EXAMPLE USAGE

If the checkbox meta field contains the following values:

And the output format is set to UL, the rendered output could look like:

  • Red
  • Blue
  • Green

If the output format is set to Plain with a delimiter of , , the result would be:

Red, Blue, Green


Dynamic Checkbox Example

TUTORIAL & ADVANCED USAGE

1. Set the Source:

Choose the appropriate data source for the checkbox values.

2. Assign the Meta Field ID:

Enter the meta field ID for the checkbox values. Ensure that the field is properly configured in JetEngine or ACF.

3. Select the Output Format:

Determine how the values should be displayed:

4. Sorting Options:

Customize the order of the displayed values:

5. Icon & Custom Styling:

If you want to add unique icons or styles to each checkbox item, use the Advanced Output feature.

Example:

  <div class="custom-item">%first%</div>

This will apply a custom class to the first item, allowing targeted CSS styling.

6. Macro Commands and Custom HTML:

The following macro commands are available:

Example:

  <div class="example">%3%</div>

This will apply the example class to the third item, allowing for targeted styling.

7. Icon Example:

You can also apply icons to specific checkbox values using custom HTML:

  <div class="custom-item">
    <i class="fa-solid fa-phone"></i> %value_Szeged%
  </div>
Note: Ensure that the required icon libraries (e.g., Font Awesome) are loaded in your theme or template.

Images can also be applied using the <img> tag, following the same method.

Remember, custom icons and HTML structures are not affected by the widget's built-in styling controls. Apply custom CSS as needed.