ACPT v2
  • General
    • Minimum requirements
    • Download the plugin
    • Install ACPT
    • Install ACPT with Composer
    • Managing your license
    • Migrating from v1
      • Fix data loss after migration from V1
    • Settings
    • Translations
    • How to open a ticket
  • Basics
    • Custom post types
    • Taxonomies
    • Post type-Taxonomy association
    • Option pages
  • Meta fields
    • Field groups
    • The meta fields manager
      • Group settings
      • Basics
      • Advanced options
      • Conditional rendering
      • Validation rules
    • Field types
      • Address field
      • Audio field
      • Audio multiple field
      • Color field
      • Country field
      • Currency field
      • Date field
      • Datetime field
      • Date range field
      • Editor field
      • Email field
      • Embed field
      • File field
      • Gallery field
      • HTML field
      • Icon field
      • Image field
      • Length field
      • List field
      • Number field
      • Password field
      • Phone field
      • QR Code field
      • Select, checkbox, and radio
      • Rating field
      • Repeater field
      • Relational field
      • Range field
      • Table field
      • Textarea field
      • Text field
      • Time field
      • Toggle field
      • URL field
      • Video field
      • Weight field
  • Permissions manager
    • Custom post types permissions
    • Taxonomies permissions
    • Option pages permissions
    • Meta fields permissions
  • Tools
    • Custom APIs
    • Health check
    • Datasets
    • Export data
    • Import data
  • Forms
    • Manage forms
    • The form builder
    • Examples of form usage
      • Create a new post type
      • Modify an existing post type
      • Create a new term
      • Modify an existing term
      • Create a new user
      • Modify an existing user
    • Form submissions log
  • Dynamic blocks
    • Create your first block
  • Developers
    • Functions
      • register_acpt_post_type
      • delete_acpt_post_type
      • register_acpt_taxonomy
      • delete_acpt_taxonomy
      • assoc_acpt_taxonomy_to_acpt_post
      • remove_assoc_acpt_taxonomy_from_acpt_post
      • register_acpt_option_page
      • delete_acpt_option_page
      • save_acpt_form
      • delete_acpt_form
      • save_acpt_form_field
      • delete_acpt_form_field
      • get_acpt_form_object
      • get_acpt_form_field_object
      • save_acpt_meta_group
      • delete_acpt_meta_group
      • get_acpt_meta_group_objects
      • get_acpt_meta_group_object
      • save_acpt_meta_box
      • delete_acpt_meta_box
      • get_acpt_box_object
      • save_acpt_meta_field
      • delete_acpt_meta_field
      • get_acpt_meta_field_objects
      • get_acpt_meta_field_object
      • save_acpt_meta_field_value
      • delete_acpt_meta_field_value
      • get_acpt_fields
      • acpt_field_has_rows
      • acpt_field_has_blocks
      • get_acpt_field
      • get_acpt_child_field
      • get_acpt_block
      • get_acpt_block_child_field
      • acpt_field
      • is_acpt_field_visible
    • Shortcodes
  • Integrations
    • API Rest field integration
    • Breakdance
      • Build a real estate website
      • Working with nestable fields
    • Bricks builder
      • Build a real estate website
      • Working with nestable fields
      • Working with Slider (Nestable) and Gallery field
      • Working with relational fields inside query loops
      • Additional options
      • Working with text links
    • Divi
    • Elementor
      • Basic field blocks
      • Nestable field blocks
      • Dynamic tags
    • Gutenberg
      • Basic fields block
      • Relational fields block
      • Repeater fields block
      • Working with FSE
    • Oxygen builder
    • Rank Math
    • SEOPress
    • Slim SEO
    • WooCommerce
    • WP All Import/Export
    • WP Grid Builder
    • WPGraphQL
    • WPML
    • Yoast
    • Zion builder
Powered by GitBook
On this page
  • Number field
  • Date fields
  • Currency, Length, and Weight fields
  • Select Multi and Checkbox fields
  • Gallery field
  • Email, Phone, and URL fields
  • Text truncate
  1. Integrations
  2. Bricks builder

Additional options

Learn how to add options for specific fields

PreviousWorking with relational fields inside query loopsNextWorking with text links

Last updated 5 months ago

Using the Bricks builder syntax, users can pass one or more arguments to using:

{dynamic_data:arg1:arg2}

ACPT allows the user to specify additional options for certain field types.

Number field

Under the hood, ACPT uses the standard PHP function.

These arguments are supported, please follow this order:

  • decimals

  • decimal point

  • decimal separator

Suppose you want to render the number 1600 as 1,600.00.

Here is how:

{acpt_name_of_the_field:2:.:,}

Date fields

Specifying the desired date format is possible for every date field.

Example:

{acpt_name_of_the_field:d/m/Y}

The current WordPress date and time formats are used if the date format is not specified.

Currency, Length, and Weight fields

These arguments are supported, please follow this order:

  • format - the string format (default: full, allowed: full | symbol | value)

  • decimal separator - the decimal separator (default: .)

  • thousands separator - the thousands separator (default: ,)

  • position - the unit of measure position (default: after, allowed: after | before)

Suppose you want to render 1600000USD.

Here are some examples:

{acpt_field_currency:symbol}            // 1,600,000.00 USD
{acpt_field_currency:symbol}            // 1,600,000.00 $
{acpt_field_currency:value}             // 1,600,000.00
{acpt_field_currency:symbol:.:,:before} // $ 1,600,000.00

Inside a CODE block, run something like this:

<?php

echo number_format("{acpt_field_name}",5,".",",");

?>

With the correct field name.

Select Multi and Checkbox fields

For Select Multi and Checkbox fields, is possible to specify how to render them.

1. Render as list

The default rendering is as HTML <ul>. It is possible to specify the CSS classes to <ul> element:

{acpt_field_list:ul:fancy-class}

The element will be rendered as:

<ul class="fancy-class">
    <li>foo</li>
    <li>bar</li>
    <li>baz</li>
</ul>

If you want to display the list as an ordered list <ol>:

{acpt_field_list:ol,fancy-class}

The element will be rendered as:

<ol class="fancy-class">
    <li>foo</li>
    <li>bar</li>
    <li>baz</li>
</ol>

2. Render as string

You can display these fields as strings, specifying also the string separator:

{acpt_field_list:string:-}

To display a field as strings separated by -, something like that:

foo-bar-baz

Gallery field

It is possible to display a gallery element by specifying its index (count starts from 0).

Example:

{acpt_gallery_field:1}

This code will render only the second image of the gallery.

Email, Phone, and URL fields

Those fields can also be rendered as simple strings and not links using the string attribute.

Example:

{acpt_field_email:string}

Text truncate

For every textual field, it is possible to truncate the text.

Example:

{acpt_text_field:30}

If you need numbers in a different format, you can rely on the standard PHP function.

dynamic data
number_format
number_format