Additional options
Learn how to add options for specific fields
Last updated
Learn how to add options for specific fields
Last updated
Using the Bricks builder syntax, users can pass one or more arguments to using:
ACPT allows the user to specify additional options for certain field types.
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:
Specifying the desired date format is possible for every date field.
Example:
The current WordPress date and time formats are used if the date format is not specified.
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:
Inside a CODE block, run something like this:
With the correct field name.
For Select Multi and Checkbox fields, is possible to specify how to render them.
The default rendering is as HTML <ul>
. It is possible to specify the CSS classes to <ul>
element:
The element will be rendered as:
If you want to display the list as an ordered list <ol>
:
The element will be rendered as:
You can display these fields as strings, specifying also the string separator:
To display a field as strings separated by -
, something like that:
foo-bar-baz
It is possible to display a gallery element by specifying its index (count starts from 0).
Example:
This code will render only the second image of the gallery.
Those fields can also be rendered as simple strings and not links using the string
attribute.
Example:
For every textual field, it is possible to truncate the text.
Example:
If you need numbers in a different format, you can rely on the standard PHP function.