Title: Filter request for form submit button label
Last modified: February 8, 2019

---

# Filter request for form submit button label

 *  Resolved [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/)
 * Hi,
 * Would it be possible to add an extra filter maybe on the `Theme_My_Login_Form_Field`
   class constructor after the wp_parse_args function so we could customize the 
   value property for example?
 * Something like that:
 *     ```
       $args = apply_filters( 'tml_login_form_field_args', wp_parse_args( $args, array(
           'type'        => 'text',
           'value'       => '',
           'label'       => '',
           'description' => '',
           'error'       => '',
           'content'     => '',
           'options'     => array(),
           'attributes'  => array(),
       ) ) );
       ```
   
 * File : theme-my-login/includes/class-theme-my-login-form-field.php L129.
 * Thank you.
    Best,

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/#post-11194183)
 * Perhaps [this new action](https://github.com/theme-my-login/theme-my-login/commit/4186569fc1a1133e67d0e62df385352955e2eb54)
   would work?
 *  Thread Starter [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/#post-11217683)
 * Hi Jeff,
 * Thanks for your reply. I don’t see this new action in the latest version of the
   plugin and I don’t get how I could change the field label with and action before
   the render process.
 * I think the filter I suggested would do the job.
 * Let me know if I can help you.
    Best, Ben
 *  Plugin Author [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/#post-11224593)
 * You don’t see it because it hasn’t been released yet. You could use it like so:
 *     ```
       function before_tml_render_form_field( $form_name, $field_name, $field ) {
           if ( 'user_login' == $field_name ) {
               $field->set_label( 'Choose a Username' );
           }
       }
       add_action( 'tml_render_form_field', 'before_tml_render_form_field', 10, 3 );
       ```
   
 * However, if you just want to change labels and the like, you can just use the`
   init` action:
 *     ```
       function modify_tml_form_fields() {
           if ( $user_login = tml_get_form_field( 'register', 'user_login' ) ) {
               $user_login->set_label( 'Choose a Username' );
           }
       }
       add_action( 'init', 'modify_tml_form_fields' );
       ```
   
 *  Thread Starter [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/#post-11227156)
 * Hi Jeff,
 * Thank you, the `set_label` method is exactly what I was looking for.
 * Best

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Filter request for form submit button label’ is closed to new replies.

 * ![](https://ps.w.org/theme-my-login/assets/icon-256x256.png?rev=1891232)
 * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-my-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-my-login/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-my-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-my-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-my-login/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/filter-request-for-form-submit-button-label/#post-11227156)
 * Status: resolved