Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
By default, errors will replace This field and This value settings values dynamically with the field name. This filter allows you to:
- Only dynamically replace [field_name] shortcodes.
- Add additional substrings for replacement.
- Add additional translated strings, if you wanted to convert more substrings universally in a single place.
Usage
add_filter( 'frm_error_substrings_to_replace_with_field_name', 'replace_with_field_name');
Parameters
- None
Examples
Only replace [field_name] shortcodes
add_filter( 'frm_error_substrings_to_replace_with_field_name', 'replace_with_field_name');
function replace_with_field_name() {
return array( '[field_name]' );
}