• I am not a programmer and I need some help. What code should I put in the custom PHP file (theme-my-login-custom.php) to post back data entered into custom fields (e.g. “First Name” and “Last Name”) that I created by modifying the ms-signup-user-form plugin template file as show below? The issue is that upon registering, if a user enters their information but then (for example) mistypes their custom password the second time, the data entered into the custom fields is lost and the user has to re-enter it. I would like for only the field that creates the error to be erased while posting back all the other entered data into the appropriate fields. Thanks!

    <label for=”first_name<?php $template->the_instance(); ?>”><?php _e( ‘First Name:’ ); ?></label>
    <?php if ( $errmsg = $errors->get_error_message( ‘first_name’ ) ) { ?>
    <p class=”error”><?php echo $errmsg; ?></p>
    <?php } ?>

    <input name=”first_name” type=”text” id=”first_name<?php $template->the_instance(); ?>” value=”<?php echo esc_attr( $first_name ); ?>” maxlength=”60″ />

    <label for=”last_name<?php $template->the_instance(); ?>”><?php _e( ‘Last Name:’ ); ?></label>
    <?php if ( $errmsg = $errors->get_error_message( ‘last_name’ ) ) { ?>
    <p class=”error”><?php echo $errmsg; ?></p>
    <?php } ?>

    <input name=”last_name” type=”text” id=”last_name<?php $template->the_instance(); ?>” value=”<?php echo esc_attr( $last_name ); ?>” maxlength=”60″ />

    https://wordpress.org/plugins/theme-my-login/

  • The topic ‘Custom Field Post Back’ is closed to new replies.