quform_custom_css

This hook can be used to add custom CSS to a form.

quform_custom_css_X

This hook is run for a single form.

Example

12
3
4
5
add_filter('quform_custom_css_1', function ($css, Quform_Form $form) {    $css .= '.quform-1 .quform-field-text { color: #121212; }';
 
    return $css;
}, 10, 2);
add_filter('quform_custom_css_1', function ($css, Quform_Form $form) {
    $css .= '.quform-1 .quform-field-text { color: #121212; }';

    return $css;
}, 10, 2);
  • On line 1, replace the number 1 with the form ID
1
2
3
4
5
6
7
function my_quform_custom_css(array $result, Quform_Form $form)
{
    $css .= '.quform-1 .quform-field-text { color: #121212; }';
 
    return $css;
}
add_filter('quform_custom_css_1', 'my_quform_custom_css', 10, 2);
function my_quform_custom_css(array $result, Quform_Form $form)
{
    $css .= '.quform-1 .quform-field-text { color: #121212; }';

    return $css;
}
add_filter('quform_custom_css_1', 'my_quform_custom_css', 10, 2);
  • On line 7, replace the number 1 with the form ID

Parameters

  • $cssstring – the current custom CSS
  • $formQuform_Form – the form instance
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy