BP Profile Search › Hidden fields
-
AuthorPost
-
FredGuest
Hi, does your beta version includes hidden fields ? This feature could permit to hide some members in the results.
Thank you for great pluginFred
FredGuestOr can we force a field (like a dropdown list) to be “unblank” in order to display only the results that have the field completed ?
Sorry for my bad englishandreaPlugin AuthorHi Fred,
If you have some programming skills you can modify the form template, in wp-content/plugins/bp-profile-search/templates/members.
After you modify a template, it’s best to move it to the directory buddypress/members inside your theme directory.
FredGuestHi, i did with a script which hide the submit button if the fields are empty :
jQuery(document).ready(function($){
$(“#bps_directory34 input[type=submit]”).attr(‘disabled’,’disabled’); //disable submit button by default
$(“input[name^=’field_3′], input[name^=’field_1′], input[name^=’field_7′]”).change(function(){
var submit = true;
if($(“input[name^=’field_3′]:checked”).val() == ‘No’ ||
$(“input[name^=’field_1′]:checked”).val() == ‘No’ ||
$(“input[name^=’field_7′]:checked”).val() == ‘No’)
submit = false;
if(submit){$(“#bps_directory34 input[type=submit]”).removeAttr(‘disabled’); }
else{$(“#bps_directory34 input[type=submit]”).attr(‘disabled’,’disabled’); }
});
});
</script>andreaPlugin AuthorThat’s great! When I write some documentation on modifying form templates, I’ll mention this solution of yours.
-
AuthorPost