This hook allows you to change the values used in the graphs.
Usage
add_filter('frm_graph_value', 'graph_value', 10, 3);
Parameters
- $values (array)
- $field (object)
- $args (array from shortcode options)
Examples
Use typed signature
This is from the signature add-on to tell the graphs to use the typed signature instead of the written one.
add_filter('frm_graph_value', 'my_custom_graph_value', 10, 2); function my_custom_graph_value( $value, $field ) { if ( is_object( $field ) && $field->type == 'signature' ) { if ( is_array( $value ) ) { if ( ( ! isset( $value['output'] ) || empty( $value['output'] ) ) ) { $value = isset( $value['typed'] ) ? $value['typed'] : reset( $value ); } else { $value = ''; } } } return $value; }
If you would like to add your own example, click here.
Have something to add?
Click here to provide feedback on this page.