I have adopted this tutorial and modified it to possess radio buttons, however it will not save my data :-(
Anything else works fine - can someone let me know what is wrong here:
add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );
function my_show_extra_profile_fields( $user ) { ?>
<table class="form-table">
<tr>
<th><label for="Arbejdsgruppe">Arbejdsgruppe</label></th>
<td>
<input type="radio" name="arbejdsgruppe" value="gruppe1" id="gruppe1" <?php if ( $account == 'gruppe1' ) echo 'checked="checked"'; ?> />Ledelsen og administrationen<br>
<input type="radio" name="arbejdsgruppe" value="gruppe2" id="gruppe2" <?php if ( $account == 'gruppe2' ) echo 'checked="checked"'; ?> />Musiklære<br>
<input type="radio" name="arbejdsgruppe" value="gruppe3" id="gruppe3" <?php if ( $account == 'gruppe3' ) echo 'checked="checked"'; ?> />Billedskolelære<br>
<span class="description">Vælg venligst en gruppe.</span>
</td>
</tr>
</table>
<?php }
add_action( 'personal_options_update', 'my_save_extra_profile_fields' );
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );
function my_save_extra_profile_fields( $user_id ) {
if ( !current_user_can( 'edit_user', $user_id ) )
return false;
update_usermeta( $user_id, 'arbejdsgruppe', $_POST['arbejdsgruppe'] );}