WPMU Extra fields not saved
-
Hello,
I wrote a few weeks ago, but no one helps me.
I try to integrate extra fields in wpmu, but it doesn′t works and there is no documentation.
in the ms-signup-user-form.php i include
<label for="first_name<?php $template->the_instance(); ?>"><?php _e( '<!--:en-->First Name<!--:--><!--:de-->Vorname<!--:--><!--:fr-->Prénom<!--:--><!--:es-->Primer Nombre<!--:--><!--:it-->Prenome<!--:-->', 'theme-my-login' ); ?></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="200" /> <span class="hint"></span>
This is not the problem, this is shown in the registration form.
in the theme-my login.php i don′t know what to do. the standard for single wordpress does not work. No error messages, no saving of the extra fields in the database.
function tml_registration_errors( $errors ) { if ( empty( $_POST['first_name'] ) ) $errors->add( 'first_name', '<strong>FEHLER</strong>: Vorname eingeben.' ); return $errors; } add_filter( 'registration_errors', 'tml_registration_errors' ); function tml_user_register( $user_id ) { if ( !empty( $_POST['first_name'] ) ) update_user_meta( $user_id, 'first_name', $_POST['first_name'] ); } add_action( 'user_register', 'tml_user_register' );
There must be another code i think.
Please help me, i try for weeks now.
Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WPMU Extra fields not saved’ is closed to new replies.