• Hi, I see the need for having two drop down select boxes in one profile field/search field. For instance, to have a search range like age to/from.
    Adding a “Number within min/max values (HTML5 field)” only let you ad one number within the defined range, not a to/from interval.
    How do I achieve this option, and would you consider this option in a future update? ??

    Regards
    Carsten

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    You can use a ‘Number’ field type, select the ‘range’ search mode, and use the template ‘bps-form-sample-1’. That should give you a range search with a drop-down selection both for the min and the max values.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi, and thanks for the reply. I want two age criterias listed, profiles own age, and the age range the profile is searching for.

    The profile field set to Range input, and the Search Mode set to range, creates the wanted two field to/from option in the search field, but only a range slider on the register page, and the edit profile page.
    The search result leaves no hits but it is probably because it is not related to the profile age using the birthday selector?

    I also want the profiles age listed in their profile in the profile search result (but here instead their birthday is shown?),

    $field_content = bp_get_member_profile_data( ‘field=Age’ );
    if( $field_content != false )
    echo “Age: ” . $field_content;

    Regards
    Carsten

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    I’m not sure I understand the two age criteria you need, could you please add more details?

    About your second question, displaying the user age in a directory entry is a bit tricky.

    That’s because the profile field named ‘Age’ actually contains the birth date, from which the member’s current age is calculated. If you wish to display the age, not the birthday, you have to perform the calculation and then print the result. If you are using the plugin ‘BuddyPress Xprofile Custom Fields Type’ to add your ‘Age’ field, you could ask the plugin author for more specific advice.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Andrea, I will correct myself, and try to clarify what I want.

    I want to have a drop-down selection both for the min. and the max. values in the User Profile Edit Field, like you described for the Search Field, by using use the template ‘bps-form-sample-1, but this is not an option here.

    Regards

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Carsten,

    The User Profile Edit is a BuddyPress function, not related to BP Profile Search. Unfortunately I don’t have an answer to your question, I suggest you ask in the BuddyPress forum.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘To/from interval in profile search’ is closed to new replies.