WordPress.org

Ready to get started?Download WordPress

Forums

BP Profile Search
BP Profile Search problems with required fields in BP 1.5+ (14 posts)

  1. rossagrant
    Member
    Posted 2 years ago #

    Hi guys,
    Having a big issue with this plugin now that required field behaviour in BP has changed.

    No idea why BP changed this behaviour but when you set a field to required that offers a drop down to select from, the first option in the dropdown is selected as default.

    The fields no longer have a ——— option at the top, which would ommit it from a search, it MAKES YOU select an answer from the dropdown.

    This means that the first option is ALWAYS selected on the search form, which means if you have multiple required fields, a search is impossible as the first option in ALL fields is selected by default.

    This way you can’t search by just one field, as all have to be selected.
    I know this sounds confusing, but if you set up some profile field dropdowns and make them required you’ll see instantly what I mean.

    Such a shame, as BP’s behaviour makes this plugin unusable when you have required fields.

    Anything that could be done, so that the option to not have a required fields work in this way in the plugin?

    Thanks so much for your time!

    http://wordpress.org/extend/plugins/bp-profile-search/

  2. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Ross,

    Thank you for your feedback, I didn't realize that BP 1.5 changed the required field behaviour.

    I'll look into this over the coming holidays. Should you solve this issue before I do, I'll happily accept a patch!

  3. noriise
    Member
    Posted 2 years ago #

    Hi @Rossagent - Any luck getting this fixed?

    I'll take a look tomorrow - but thought i'd check.

    Ta,

  4. rossagrant
    Member
    Posted 2 years ago #

    @noriise, I currently have the plugin disabled at the moment as I can't use it in it's current form.

    Would be absolutely awesome if we could get a fix on the required fields issue.

    Really would love to use it.

  5. If you want to flip back to the old behaviour in a certain place, where you use bp_the_profile_field_options() or bp_get_the_profile_field_options(), set the null_on_required property to true. e.g.

    bp_the_profile_field_options('null_on_required=true)

  6. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you Paul, this is really helpful. I'll release a BP Profile Search update shortly.

  7. rossagrant
    Member
    Posted 2 years ago #

    @Paul Gibbs

    Mr. Gibbs, yet again you have come to the rescue!

    You're an absolute legend mate!

    Can't wait for the update Andrea!

    This is such a useful plugin!

  8. noriise
    Member
    Posted 2 years ago #

    Thanks for the update - didn't work for me - any ideas? I added the condition as per Mr Gibbs suggestion. 4 instances in the bps-searchform.php

    No instances of bp_get_the_profile_field_options() though.. For instance:

    <?php				break;
    
    				case 'selectbox':
    ?>					<label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?></label>
    					<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
    						<?php bp_the_profile_field_options('null_on_required=true'); ?>
    					</select>
  9. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry to confirm, it doesn't seem to be working, and I didn't find any instance of the string 'null_on_required' in the BuddyPress 1.5.4 source code. Perhaps it will be in BP 1.5.5?

  10. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    The new BP Profile Search 2.8 is now available. It fixes the required fields display in the search form, and the Age Range Search feature that stopped working correctly in BP 1.5.

    Thanks Julien for your Age Range patch, and thank you all for your feedback and suggestions!

  11. noriise
    Member
    Posted 2 years ago #

    Thanks a million Andrea. Unfortunatly it does not work for me.

    I get the blank field now, but on search I get:

    Sorry, no members were found.

    Any ideas and once again many thanks for your hard work.

  12. rossagrant
    Member
    Posted 2 years ago #

    Once again, works for me now, no problem!

    The only weird thing I did notice is that if I did a specific age range search that I knew I, myself should fall into, I wasn't showing up in it at first, even though my Date Of Birth field was correctly filled out and should have shown in the search.

    After saving my profile data again, I then showed up.

    Is there a reason for that do you think, or did it just require a save, for it to update the plugin somehow with the field?

    Is it likely other people will be missing from age range searches?

    Thanks SO much for this!

    Ross :)

  13. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    Ross,

    I think that was a cache problem. BP Profile Search doesn't have a cache, but your installation or hosting environment could have many cache levels, and a glitch could happen.

    Elliot,

    I could have a look at your installation, if you send me a password for admin access (mail to andrea@blogsweek.com).

  14. noriise
    Member
    Posted 2 years ago #

    Thanks Andrea - Email sent :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic