0
votes

I am trying to add some extra fields in theme my login Plugin Wordpress.

I am done with the documentation of the theme.

The extra fields aren't been saved on database. I have added the extra fields in the db as well but still the data are not been saved in db

Any Suggestion?

1
ca you post your code which is you have tried? - Vel
I have used this link docs.thememylogin.com/article/…. and pasted the code in my functions.php of theme my login. - Vishal Sharma

1 Answers

0
votes

You need to use custom type not text and first_name

function add_tml_registration_form_fields() {
    tml_add_form_field( 'register', 'custom_1', array(
        'type'     => 'custom',
        'label'    => 'First Name 1 ',
        'value'    => tml_get_request_value( 'first_name_test', 'post' ),
        'id'       => 'first_name_test',
        'priority' => 15,
    ) );
    tml_add_form_field( 'register', 'custom_2', array(
        'type'     => 'custom',
        'label'    => 'Last Name 1',
        'value'    => tml_get_request_value( 'last_name_test', 'post' ),
        'id'       => 'last_name_test',
        'priority' => 15,
    ) );
}
add_action( 'init', 'add_tml_registration_form_fields' );

Read this

https://docs.thememylogin.com/article/104-function-tmladdformfield