How add filter to bp_the_profile_group_field_ids?
-
I’m a total novice with PHP and need some help with creating some code to go inside my functions.php file. The code I need is a clone of the call to bp_the_profile_group_field_ids() that will filter out 3 xprofile field names that I don’t want users to be able to edit.
Background: I’ve successfully modified the edit.php file to not display those 3 “required” fields (because I don’t want users to be able to edit them). However, the problem I discovered is that after modifying the edit.php file to hide those 3 fields (which I make “required” during registration), when a user clicks “Save Changes” on their Edit Profile page, it results in the message: “Please make sure you fill in all required fields in this profile field group before saving” (even though all required fields have data in them).
Through my online research, I found that the following line of code in the edit.php file is the problem…
<input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
Apparently, the call to bp_the_profile_group_field_ids() which creates a list of the expected field names does not have a filter. So I would need to clone that function in my functions.php file and manually filter out my 3 desired fields from the string that gets generated.
Anyone able to help with this… PLEASE?
- The topic ‘How add filter to bp_the_profile_group_field_ids?’ is closed to new replies.