• Resolved mcdeth

    (@mcdeth)


    Hi, some styles are hardcoded inline such as spinner

    $output .= '<div><button id="'.esc_attr( $keys[3] ).'-'.$s.'" type="submit" class="button" style="background-size:22px 22px !important;background-repeat:no-repeat !important;background-image:url('.includes_url( '/images/spinner.gif' ).') !important" onclick="essential_form_'.sanitize_key( $keys[0] ).'('.$s.');return false;">'.esc_html( $button_text ).'</div>';

    Or submission notification styles

            $output .= '.'.esc_attr( $keys[0] ).'-wrp .ef-error{border:1px solid red;padding:10px;margin-bottom:16px}';
    $output .= '.'.esc_attr( $keys[0] ).'-wrp .ef-success{border:1px solid green;padding:10px;margin-bottom:16px}';

    is there a clean way to override it? ef-success can use important rule, but the button already uses important rule

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Mortellaro

    (@giuse)

    Hi @mcdeth

    I suggest you update to v. 1.0.1.

    Then you can use the filter ‘essential_form_submit_style’ to customize the button style.

    This is an example of code you can add to the funcitons.php of your child theme or to a functional plugin:

    add_filter( 'essential_form_submit_style', function( $styel ) {
    return 'background-size:48px 48px !important;background-repeat:no-repeat !important;background-image:url('.includes_url( '/images/spinner.gif' ).') !important';
    } );

    In this other example you completely reset the inline style given for the button:

    add_filter( 'essential_form_submit_style', '__return_empty_string' );

    and you can write your custom CSS

    I hope it helps.

    Have a great day!
    Jose

Viewing 1 replies (of 1 total)

The topic ‘Styling’ is closed to new replies.