Title: Conditional Logic
Last modified: August 21, 2016

---

# Conditional Logic

 *  [centbanc](https://wordpress.org/support/users/centbanc/)
 * (@centbanc)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/)
 * 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://wordpress.org/plugins/bp-profile-search/](https://wordpress.org/plugins/bp-profile-search/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883503)
 * 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 [http://jsfiddle.net/arunpjohny/2pza5/](http://jsfiddle.net/arunpjohny/2pza5/))
 *  Thread Starter [centbanc](https://wordpress.org/support/users/centbanc/)
 * (@centbanc)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883578)
 * 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](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883616)
 * > 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](https://wordpress.org/support/users/centbanc/)
 * (@centbanc)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883621)
 * 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](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883623)
 * 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.

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/conditional-logic-6/#post-4883623)
 * Status: not resolved