Support » Plugin: Theme My Login » Change form button text on certain page

  • Resolved pmascis

    (@pmascis)


    Hi all,

    My question is similar to this:
    https://wordpress.org/support/topic/change-form-button-text/

    However I have a few different login forms on one site.
    One on the standard login form (‘Log In’) here is fine, but then I have another where a user logs in to RSVP to an event and the terminology is all different here, and I’d like the button text to say something else here only.

    Any ideas are much appreciated, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pmascis

    (@pmascis)

    Used some jQuery for now.
    $(‘input:submit’).attr(‘value’,’NEW TEXT’);
    But if there’s a better PHP solution it would be preferred, cheers.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    
    function modify_tml_login_form() {
        if ( is_page( 'some-page-slug' ) ) {
            if ( $submit = tml_get_form_field( 'login', 'submit' ) ) {
                $submit->set_value( 'NEW TEXT' );
            }
        }
    }
    add_filter( 'wp', 'modify_tml_login_form' );
    
    Thread Starter pmascis

    (@pmascis)

    Ah, great! Thanks Jeff!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change form button text on certain page’ is closed to new replies.