I have created custom fields on my registration form, such as 'telephone', using Theme My Login. I have found a way to make them appear in the backend (on the User page) but I can't update those fields.
What do I need to do in order to be able to update them?
Register-form.php:
<label for="telephone<?php $template->the_instance(); ?>"><?php _e( 'Telephone', 'theme-my-login' ) ?></label>
<input type="text" name="telephone" id="pays<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'telephone' ); ?>"/>
Functions.php:
<?php
function custom_user_profile_fields($user) {
?>
<table class="form-table">
<tr>
<th>
<label for="telephone"><?php _e('Téléphone'); ?></label>
</th>
<td>
<input type="text" name="telephone" id="telephone" value="<?php echo esc_attr( get_the_author_meta( 'telephone', $user->ID ) ); ?>" class="regular-text" />
</td>
</tr>
</table>
<?php
}
add_action('show_user_profile', 'custom_user_profile_fields');
add_action('edit_user_profile', 'custom_user_profile_fields');
?>