Changing IDs of search fields (v.5.3.2) / Use of default value or required field

Home Forums BP Profile Search Forum Changing IDs of search fields (v.5.3.2) / Use of default value or required field

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10450 Reply
    Andrew
    Guest

    Hello!
    First of all, thanks for your great plugin!
    I have two questions:

    1) I have a little trouble to change css styling in new version (5.3.2).
    Actually, I use a different style depending on the search field. Let’s say I apply a different style on search fields “Name” and “Favorite color”. So, I use these css selectors: #display_name_contains_wrap, #display_favoritecolor_contains_wrap. These styles work great until I perform some search; after performing a search my styles are not more applied. I found a case of this trouble: at some point after perform any search, the ids of search fields were changed. So, there are no more #display_name_contains_wrap and #display_favoritecolor_contains_wrap but we have #display_name_contains_1_wrap and #display_favoritecolor_contains_1_wrap.
    So I wonder if using these “double” IDs system (#display_name_contains_wrap and #display_name_contains_1_wrap) will be permanent in your plugin and I will have to add these new css selectors in my style, or it’s a just some temporary solution in ongoing version of your plugin.

    2) The new features, default value and required fields are really awesome, but I’m not able to make it work. I use the code example you provide (https://dontdream.it/bp-profile-search-5-3/), I tried the fresh install of plugin, disable all plugins and disable the custom theme and functions, but still unable to setup default value for the given search field or make some field as required. Do you think there is some problem with my installation or it is a some known issue?

    Many thanks in advance for all your help!

    #10452 Reply
    andrea
    Keymaster

    Hi Andrew,

    1) You’re right, that’s just a temporary solution that will be removed soon. In the meantime, if you are not using search by distance, you can roll back to version 5.3, manually or using the WP Rollback plugin.

    2) Please make sure that your file bp-custom.php is located in wp-content/plugins and is readable. If it is, are you getting any errors in your error log?

    #10453 Reply
    Andrew
    Guest

    Hi Andrea,
    Thank you very much for your quick reply.

    1) OK, copy that. I will wait for next updates (I tried to downgrade my version, but I have a bug when all fields appear twice).

    2) Custom functions php was located well and I didn’t have any errors shown. After some digging I finally realized that I used a custom profile field type with a custom $f->code. So in my function to set up default value for the search field, I changed $f->code according to my custom field type. So, if anybody also has some problem with the default value or required fields, be sure to check that your field_id is correct!

    So for now the problems are resolved. I will wait for new version of plugin to be able to use my css selectors.
    Thanks you Andrea for your suggestions and thank you very much for your plugin and all your work!!!

    Best, Andrew.

    #10454 Reply
    andrea
    Keymaster

    Hi Andrew,

    You’re welcome! I’m glad you found the solution to the field ID issue.

    To be able to apply your CSS, try to roll back to 5.3. Field duplication is a bug in 5.3.1, while 5.3 has a transient bug in the search by distance field, that won’t affect you if you aren’t using search by distance.

    #10508 Reply
    andrea
    Keymaster

    Hi Andrew,

    As promised, the new version 5.3.3 should fix the ID issue you reported.

    #10519 Reply
    Andrew
    Guest

    Hi Andrea!
    Thank you very much!

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Changing IDs of search fields (v.5.3.2) / Use of default value or required field
Your information: