Hidden fields

BP Profile Search Hidden fields

  • Author
    Post
  • #3386 Reply
    Fred
    Guest

    Hi, does your beta version includes hidden fields ? This feature could permit to hide some members in the results.
    Thank you for great plugin

    Fred

    #3387 Reply
    Fred
    Guest

    Or 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 english

    #3389 Reply
    andrea
    Plugin Author

    Hi 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.

    #3409 Reply
    Fred
    Guest

    Hi, 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>

    #3411 Reply
    andrea
    Plugin Author

    That’s great! When I write some documentation on modifying form templates, I’ll mention this solution of yours.

Reply to: Hidden fields
My Information