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 filter allows modifying CSS variables of the Likert field.
Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
Usage
add_filter('frm_surveys_likert_css_variables', 'my_custom_function', 10, 2);
Parameters
- $variables (array): An array with keys are CSS variable names (includes `--`) and values are variable values.
- $field (array): Likert field data.
Examples
Add custom CSS variable to the Likert field
add_filter('frm_surveys_likert_css_variables', 'add_surveys_likert_css_variables', 10, 2);
function add_surveys_likert_css_variables( $variables, $field ) {
if ( 13 == $field['id'] ) { //Replace 13 with the ID of your field
$variables['--custom-variable'] = '1000px';
}
return $variables;
}