BuddyDev

Introducing Conditional Profile Fields for BuddyPress plugin

We have updated the BuddyPress Conditional profile fields to fix all bugs and now It support all field types except the date field

Do you want to customize your registration page and show different fields to different type of users. based on the user input data. For example, Let us say you are creating a dating site and want to display different profile fields for Male/Female, then you are in for a treat now. The Conditional Profile Fields for BuddyPress plugin allows you to Show/Hide various fields based on the criteria you set on the Profile field management screen.

Features:-

  • Control display of the profile fields based on various conditions
  • Easy to Use admin panel
  • Flexible plugin, should work with 99% of the themes

Here is a screenshot of the back end panel.

field-edit-option

On the Add new/Edit profile field you can select the conditions to apply. With this plugin you get following options:-

  • 2 visibility option to either show the field or hide the field based on the condition
  • A field drop down box to allow you choosing the field that governs the display of this field
  • 6 operators to match the values( 6 operators for the number/text/textarea field and 2 operators for matching the multi select box/check box/radio )
  • Currently date field is not supported for creating condition
  • It supports the multi type field as well as other fields( and should support custom profile fields too automatically )

It is free. And here are the links:-

Download:-

https://buddydev.com/plugins/conditional-profile-fields-for-buddypress/

Contribute:-

https://github.com/sbrajesh/conditional-profile-fields-for-buddypress

So what other ways do you think this plugin can be used? Is there something I have missed? please do let me know your suggestions & feedback in the comments below 🙂

77 Responses to Introducing Conditional Profile Fields for BuddyPress plugin

  • Very cool @sbrajesh this is a real treat!

  • Great one 🙂

  • I haven’t been able to get this one working. I find that if a field has conditional visibility set then it is hidden altogether, even if a matching answer is set in the field that controls it. I don’t get any errors, it just doesn’t show the field whatsoever. However, it does seem to show the answer to the hidden field on the View Profile page, despite now showing the profile field in the edit page.

    • Hi Sarah,
      Thank you for the comment. You are rigt about both of the things.
      1. If visibility is set to show, It is not working properly.
      2. If the hidden field has some value earlier, It was visible on profile.

      I have fixed the 2nd issue and I am working on 1st one. Will have an update in couple of hours and will message her.

      Thank you so much for reporting the issue.

      Thanks
      Brajesh

      • Were both issues fixed? I don’t see new commits on github, so wondering.

        • Hi slaFFik,
          My apologies for the delayed reply.

          I am hoping to put the update by tomorrow.

          Thank you
          Brajesh

  • Can this plugin be used to affect both the fields on the registration form and on the resultant user profile, or just the former? Thanks.

    • Hi rtd2,
      It will work with registration page as well as the edit profile page.

  • Hi all,
    currently, this plugin is having issues for multi field type( datebox/checkbox/radio). I am working on a fix and will have an update tomorrow.

    Thank you
    Brajesh

  • Hi Brajesh, this is EXACTLY what BP needs in it’s core – the ability to handle multiple profile types.

    Did the issues mentioned above get fixed – you should really push to have this put into core!

    THANK YOU!

    • Hi Ross,
      Thank you.
      I was busy with another plugin and could not look at this.
      i will be working on today/tomorrow and will have an update to fix all the bugs by tomorrow.
      let us hope that oneday, we can get it into the core, i will certainly try to convince the Core team once the plugin is bug free 🙂

    • Totally agree Ross, this functionality needs to be in core.

      Brajesh, thank you for an amazing plugin!

  • Hi All,
    I have updated this plugin now. Please do check the update and have a great weekend 🙂

  • I like the plugin verry much, but I think there is a bug inside?

    If you make fields reguired inside the profile type, the user can’t signup annymore, because he has also insert the reguired fields from the other profile type.

    So if you selected “student” en you made some fields reguired in the profile type “teacher” you have a problem. The student need the fill also the reguired fields from the teacher account type.

    Is there a work around to fix this or do I miss something? Hope you can help me with this.

    Kind regards!

    • Exactly the same issue for me, is there a fix for this issue ?

  • Dude I made it work in the registration page but when a registered user goes to profile editing page all the fields become visible to him please help me to hide them

    • Hi Afreed,
      I am sorry but I don’t know why It would not work for you. Are you using a custom theme? Is there any javascript error on the profile edit page?

  • Pat #

    Hi Brajesh,

    Thanks for your plugin.
    Looking at the different comments on this page, it appears that normally, the last update of the plugin should allow to display only fields that have content in it, in the edit profile page of a member.

    I just tested it and this is not the case for me. All fields are displayed in edit mode, even those that were hidden by condition.

    What I would like is that when a field is hidden with a specific condition, this hidden condition applys also for the edit page in the member’s profile page.

    Did i miss something?
    Regards
    Pat

  • Howdy. It seems I’m having the same issue as Afreed, where all fields are visible on the edit profile page. Any ideas on how to solve this?

    • Hi Jamey,
      Can you please point me to your site via contact form. I will be happy to troubleshoot the plugin there and fix any issue.

      Thank you
      Brajesh

      • Hello Brajesh. I actually am developing the site locally at the moment so I cannot send you a screenshot. However, I am using an integration between BP and WPMUDev’s Membership 2 Pro plugin, so perhaps the issue stems from that integration?

        • Sorry, I can’t send you a *link. Didn’t mean to type “screenshot”.

          Once the site is in a live environment, I will send along more information if I am still having issues.

          Thanks again.

        • Hi Jamey,
          Thank you for the reply.

          I am looking forward to it. Please do check on edit page if there is any javascript errors.

  • I have same issue as Vincent. You have to fill required field that only suitable for another member type.

    • Hi Muhtajin,
      I am sorry for the trouble. Can you please check if you have javascript error on edit/registration page. On Edit/Registration pages fie;ds are hidden using js(to show/hide quickly). So, if your site has any js error, it will not work.

      Please check and let me know if you see any error there.

  • Hi,

    I have been trying to use the option and interestingly the work you have done is incredible. Although i am no coder but can you can please help that if in case i use the conditional profile field, and in my edit group in a particular i have the below combination

    If Select field is Previous Company and is = “”

    Previous Company is a text input box and has no certain answer as every individual has different companies they worked with. Therefore can this option have an alternate like true or false? like a text input if yes show another field?

    Please advice

  • Sam #

    I am currently developing a BP site and this is exactly what I need – although BP is now up to version 2.3.4 – Will you be testing / updating this plugin to keep it working? This would be absolutely perfect for my site! Thanks.

    • Hi Sam,
      Thank you for the comment. Yes, we will keep this plugin updated and we are here to support all our plugins for any future changes in BuddyPress.

      Thank you
      Brajesh

  • Hi All,
    If you are facing issue that this plugin did not hide fields, please upgrade to 1.1.4. I noticed it happening for some sites due to the way json_encode treats data. Have updated the plugin. It also works great with BuddyPress 2.4 RC1.

    Thank you
    Brajesh

  • the plugin wont work in wordpress last version and buddypress last version…

    • Hi Nacho,
      I had tested this plugin with BuddyPress 2.4.0 and WordPress 4.3.1 yesterday. It is working fine on the test installation.
      Since this plugin uses javascript, It may conflict with some theme or other pugin. Can you please tell me which theme are you using ? Is there any js error?
      Also, if you don’t mind, please open a topic in forum to allow us help better.

      Thank you
      Brajesh

  • Hi Brajesh,
    Thanks for your plugin.

    Is there any possibility that (in next release of this plugin) you implement more visibility conditions for a single field?

    Something like next image:
    http://athlether.com/WP_conditional-profile-fields-for-bp_FOR-UPGRADE.jpg

    Regards,
    Niks986

    • Hi Nikola,
      Thank you. I am glad it is working.
      I will certainly consider your suggestion in future. Looks great to me.

      Thank you
      Brajesh

  • Hi Brasjesh,
    I’m using the wplms theme and I’ve installed your plug in but it doesn’t seem to be working.
    Can you help me on this?

    • Hi Joao,
      Please point me to your site. Most of the issues I have seen recently have been related to some javascript issue. Please point me to your site and I will let you know what issues are there.

      Thank you
      Brajesh

  • Hi,
    I just installed your plugin, but it doesn’t seem to work. I m on WP 4.3.1 and buddypress 2.3.5.
    When I look at the console, I have the followinf error :

    Which corresponds to line 6 of the bp-conditional-field.js file

    Would you have an idea ?
    Thanks per advance.

    • Hi Matt,
      My apologies. We do not monitor comment at the moment and mostly provide support via forum, so I missed and only checked afetr your message.

      Can you please delete the old plugin, Install the one available at the moment from BuddyDev and check if it is happening? We had a fix in the latest version to solve this issue. If it is still happening, please open a topic on the forum and I will help quickly.

      Thank you
      Brajesh

  • Hi,
    I just installed your plugin, but it doesn’t seem to work. I m on WP 4.3.1 and buddypress 2.3.5.
    When I look at the console, I have the following error :

    Which corresponds to line 6 of the bp-conditional-field.js file

    Would you have an idea ?
    Thanks per advance.

    • Hi Matt,
      Just replied to your other comment. Please check and let me know.

      Thank you
      Brajesh

  • Hi, great plugin tnk.
    I installed it and, for example, i created 3 fields (dropdown select) and i populate it :
    1 naz: —,italy
    2 region: —,lazio
    3 province: —, roma

    but, when i click on first default value of naz
    region field hides while province is visible (show).
    This is a bug?
    my brutal workaround is:

    • Hi,
      I am sorry but I did not understand what is the current setup for you. Can you please let me know what setup you have specified for these fields?
      Thank you
      Brajesh

  • If no data is saved for a checkbox field, the plugin doesn’t work correctly.

    I’ve fixed modifying the file bp-conditional-profile-fields.php rows between 197 and 203 with:

    • Hi Gregorio,
      Thank you for posting. we will be certainly looking at it and update it within next few days.

      Thank you
      Brajesh

  • I’m looking for this function that based on user’s role instead of user’s field data. Is that some code that I can use to hook?

    • Hi,
      If you can create a pseudo role field( or use our pseudo role field plugin), It may work for roles. Please give it a try and let us know in forums how it goes. we will be happy to assist.

      thank you
      Brajesh

  • Viv #

    Doesn’t work for me. Doesn’t even seem to save the conditions data. I’m working with multifields.

  • Hi , great plugin but I can’t make conditions based on Member Type – let’s say that I create two member types: (1) Doctor (2) Patient. During user registration I want to present special profile fields for each member type, so for example , if a doctor member type, i want to ask for its Title , so I’m creating a new profile field “Title” and in the condition I set show only if the registration member type is “Doctor”. But this doesn’t work.
    Appreciate your help.

    • Hi Ro,
      Thank you for posting. This plugin does not support the member type field yet. Are you using our member type field plugin?

      We will have a release this week to add support for the member type field plugin.

      Thank you
      Brajesh

  • gm #

    Nice Plugin! – but I have the same issue as Vincent and Muhtajin.

    So – the plugin is not usable if you have different required fields
    for more than one member type – Does anyone have a solution for it?

    Regards

    • Hi GM,
      I am sorry but that is by design. I do not want to override BuddyPress’s behaviour. If I override that most probably users are going to misuse that. I don’t want to take any blame for that.

      It is upto the webmasters to decide and override since it is not any deviation for default BuddyPress behaviour.

  • Hi, Brajesh.

    Great plugin, but I have an issue when a radio button without xpfields.data is checked by default. In this case, the default option should active the conditional field, but it doesn’t work.

    I solve the issue putting other condition in this conditional, bypassing the apply_initial_condition function. It doesn’t get the value to a checkbox o radiobutton field.

    Sorry my english

    • I am glad you modified to make it work. We will test and include in the future updates. Thank you for posting here 🙂

  • Not working with Version 2.7.4 of Buddypress

  • Hi,
    Great Plugin But I’m Getting These bellow Error

    Uncaught TypeError: Cannot read property ‘type’ of undefined
    at HTMLDocument. (bp-conditional-field.js:21)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at Function.ready (jquery.js?ver=1.12.4:2)
    at HTMLDocument.K (jquery.js?ver=1.12.4:2)

    and field can be seen by option is also coming vertically, after installing conditional profile fields

  • I installed this plugin but don’t know how to use this.. I can’t change or delete the profile field. will you help me out ??

  • Hi Brajesh, great plugin! But it stopped working with the new 2.9 BuddyPress! :/

    • Hi Guilherme ,
      My apologies. We are in the process to update our plugin for BuddyPress 2.9.

      Please allow us 2 days to test and update it.

      Thank you
      Brajesh

  • Hi,

    I would like to make a few fields in users profile which can only be modified by the admin and if the admin has filled it then to display it. Can I do this with your plugin ?

    Thanks for any help,
    Thomas

    • Hi Thomas,
      Thank you for asking.
      Please give a try to BuddyPress Non editable profile field plugin. You will need to slightly alter it for restricting user from entering any content though.

      Hope that helps.

  • Sorry, I think I posted this as a reply to another comment.

    Will multiple conditions be added in the future?

    I ask because my situation is like this:

    -I have a member category selection with four items.
    -I am asking for a date to be selected for the next field, but I do not need to display that field if the Category chosen is the third or fourth item.

    Presently I see only one conditional for a field. Maybe adding a button to add additional conditions would be possible in a future release?

    Thank you!

    • HI Tom,
      Thank you for asking.

      We are going for a complete rewrite for the plugin in early October. The new release will have compatibility with any existing custom profile fields( core/added by 3rd party plugins).
      We are also hoping to add multi condition in the rewrite.

      Thank you
      Brajesh

  • Hi. I really need to use this plugin but have problems with it. I’m using WP 4.9 + BP 2.9.2 + KLEO. I have radio buttons in a profile field (1) and some other conditional profile text fields associated with these radio buttons via “Show current field if (1) = My radio button option”. My problem is; when I select an option, unrelated fields are hidden (which is OK), but related options don’t show up unless I save it. After saving related fields are visible. Plugin hides unrelated fields as it should but doesn’t show related fields without saving. I’ve switched to default wp themes but the problem still persists. What do you recommend about this problem? Cheers.

    • I’m still waiting for a response…

    • When I select dropdown instead of radio buttons, it works btw…

    • Sorry, we haven’t been looking at our blog comment recently.
      I hope you got a solution for now.

  • This is a great plug-in if you need conditional logic within a single field group.
    Unfortunately, even if the admin interface seems to allow it, it does not work when the condition field is in an other field group than the conditioned field.
    (FYI I tested the latest version 1.2.2 of this plugin on a fresh and clean install of WordPress 4.9.8, BuddyPress 3.1.0).

  • This is a great plug-in if you need conditional logic within a single field group.
    Unfortunately, even if the admin interface seems to allow it, it does not work when the condition field is in an other field group than the conditioned field.
    (FYI I tested the latest version 1.2.2 of this plugin on a fresh and clean install of WordPress 4.9.8, BuddyPress 3.1.0).

    • Hi Nicolas,
      Please allow me till the weekend to test it.

      Thank you
      Brajesh

Subscribe