$field->replace()
It parses any queries found in the field value.
Parameters
Name | Type | Default | Description |
---|---|---|---|
$data | array |
[ ] |
|
$fallback | string |null |
'' |
Fallback for tokens in the template that cannot be replaced (null to keep the original token) |
Return type
Example
Given the field contains string templates, use this method to replace them with values:
Example text:
Will result in