Support » Plugin: Theme My Login » Add attributes to form tag

  • Resolved jminovicell

    (@jminovicell)


    Hi, I was wondering if there is some way to add attributes like class or data-attributes to the login, register, etc. form. Into the <form> tag like we do for the fields.

    Thank you so much!

Viewing 1 replies (of 1 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    
    function customize_tml() {
        if ( $form = tml_get_form( 'login' ) ) {
            $form->add_attribute( 'data-action', 'login' );
        }
    }
    add_action( 'init', 'customize_tml' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Add attributes to form tag’ is closed to new replies.