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.
This hook can be used for making adjustments to the field before it's label and value is displayed.
Usage
add_filter( 'frm_field_value_object', 'change_field_name_property' );
Parameters
- $field (object) Field object
Examples
Change property
This example will change the name property of a field
add_filter( 'frm_field_value_object', 'change_field_name_property', 10, 1 );
function change_field_name_property( $field ) {
if ( $field->id === '123' ) {
$field->name = 'new name';
}
return $field;
}
Replace the value (123) by the id of the field you need to modify