yandapanda
Forum Replies Created
-
Thank you. I found the issue in the Form and have updated it. It appears to be working now.
After reading other posts — the message asking for debug logs to be turned on is no longer appearing, and there is still nothing in the logger.
I found the issue. Apparently, the Profile Tabs extension was inhibiting quite a few things. Not worth the bother. Profile Tabs removed, and all seems to be stable now. I did have to put in code to double check if the user was changing the District so that it would call up the new options.
That does not appear to make any difference. The user meta tags are shown properly on the Account page, but any attempt to alter the data breaks the connection.
I will try moving the custom fields to a custom tab to see if that helps.
Thank you for your example, it helped me to create my own custom callback. The callback works very well on the initial registration screen.
I added in a check to plug in the current club on the profile page (pulled from the user data). However, I still find that on profile
- edit
, the field (club_name) comes back with no values (“No results found”). Even if I alter/change the parent, it still gets no data for fill in.
Can someone tell me what I might be doing wrong?
Here is my code (minimized):
function get_clubs( ) { $user_id = um_profile_id(); $user_district = get_user_meta( $user_id, 'district', true); if (! empty ($user_district)) { $choice = $user_district; } else { $choice = $_POST['parent_option']; } switch( $choice ) { case 'District 1' : $club_name = array( "Club1" => "Club1", "Club2" => "Club2" ); break; case 'District 2' : $club_name = array( "Club1" => "Club1", "Club2" => "Club2" ); break; case 'District 3' : $club_name = array( "Club1" => "Club1", "Club2" => "Club2" ); break; case null : $user_id = um_profile_id(); $user_club_name = get_user_meta( $user_id, 'club_name', true ); $club_name = array( $user_club_name => $user_club_name ); break; default : $club_name = array(); } return $club_name; }
TIA