Add new field to buddypress member search form
Is there any way to add the extra fields to the buddypress member search form.
What I want is to add a new field called User role in a dropdown and when selecting the dropdown, only the users with the selected role should be listed in the members page.
Currently, I have been able to add the field using buddypress filter hook bp_directory_members_search_form . But, I don’t know how to handle that new fields because while clicking the submit button in the form, currently it runs ajax and only the default (previous) field i.e. the member name field seems to be posted.
I can also change the members loop function
if(bp_has_members( bp_ajax_querystring( ‘members’ )
with my custom conditions by adding the ids in include parameters. But, I have not been able to find what is submitted in the role field from my form.
So, I want to know what is submitted from the newly added field in member-loop.php file.
Note, I don’t want to use any other plugins for this task.
- You must be logged in to reply to this topic.