• Hello!

    I’m very excited to be using this plugin, but am looking for some help. We run a directory website in which users can search for other users based on their city and neighborhood. Inputting the city field is no problem, but I can’t figure out how to solve the neighborhood dilemma. For instance, the ideal scenario would be for someone to select their city (New York), and then be able to select a neighborhood that is specific to that city (SoHo). Alternatively, if they wanted to search Hollywood, Los Angeles, they’d be able to do so.

    If this is impossible, I’d love to hear any other suggestions that would allow us to accomplish the same thing. Thank you!

    https://www.ads-software.com/plugins/bp-profile-search/

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

    (@dontdream)

    Hi centbanc,

    BP Profile Search is unable to generate a form with conditional logic, but is able to process any manually written form, as long as the form submits the expected POST data.

    So I suggest you write your own search form, with JavaScript code to handle the conditional logic (see for instance https://jsfiddle.net/arunpjohny/2pza5/)

    Thread Starter centbanc

    (@centbanc)

    I’m using Gravity Forms with the User Registration add-on, which allows me to create forms with conditional logic. How would I have this form submit the expected POST data?

    What I’m attempting to do is display BP users based on a certain city (which is another topic entirely– I know I have to go to another forum for that). At this point, I’m not sure if the results should be displayed same-page or on another page. In any case, I wish to have our users be able to further filter the BP member directory based on certain profile fields (in example: type of car, favorite food, favorite music, etc) and have the results displayed accordingly.

    Plugin Author Andrea Tarantini

    (@dontdream)

    How would I have this form submit the expected POST data?

    You can determine what the expected POST data are by inspecting the HTML code of your BP Profile Search form.

    I don’t know if Gravity Forms is able to configure the POST data it submits; if it can, then you can use it to build a search module for BP Profile Search, using the data gained with the above mentioned HTML inspection.

    Thread Starter centbanc

    (@centbanc)

    Hi Andrea,

    I don’t have much programming experience and our budget for outside hires is limited. Is there any documentation that could assist me in both determining what the expected POST data is and also how to build a search module for BP Profile Search?

    Alternatively, if there are any recommendations you have that only require using your plugin as-is to achieve what we’re looking for, that would be very appreciated.

    Plugin Author Andrea Tarantini

    (@dontdream)

    Sorry, maybe I used the wrong words.

    To send the expected POST data you simply have to use the same value for the name attribute, and to see what that value is you can simply inspect a BP Profile Search form with your browser’s View HTML feature.

    For instance, for a textbox field BP Profile Search generates something like this:

    <input type="text" name="field_37" id="field_37" value="">

    You can write an entirely different search form, and it will work if you use the same name in your form, that is:

    name="field_37"

    Hope this is a bit clearer!

    Of course you’ll need a solid HTML, CSS and JavaScript experience to write a working search form with conditional logic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional Logic’ is closed to new replies.