Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

[Resolved] Conditional Fields for Buddypress doesn’t work

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56207

    I use Single Member Type field on my register-page. I want other XProfile fields to become conditionally visible based on the selected member type. This used to work, but it no longer does.

    What I have tested:

    – The Single Member Type field does not fire a native change event on its own anymore; I had to add a custom script to make it emit a change event (verified in the browser console).

    – My own JS and PHP patches run correctly on the registration page.

    – The hook bp_cpf_enqueue_scripts exists, but Conditional Profile Fields does not seem to initialize its scripts on the registration page.

    – In the console, typeof bp_cpf_conditions remains undefined, which indicates that the conditional logic is not being loaded.

    – There are no caching or minification plugins active.

    – The registration page contains XProfile fields, including the Member Type field.

    My question:

    Does the free version of Conditional Profile Fields support conditional logic on the BuddyPress registration page when the Member Type field is used as the trigger?

    If yes:
    Which hook or method should I use to ensure that bp_cpf_conditions is initialized on the registration page?

    If no:
    Is the recommended workaround to create a hidden XProfile select field as the trigger, and copy the Member Type value into that field via JavaScript?

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on #56208

    Hi,
    Thank you for using the member types pro plugin.
    You do not need conditional field if you are using this plugin.

    If this is not firing, it is a bug.

    – Are you using BP Nouveau or BP legacy template pack?
    – Is there any plugin(like Youzer etc) that changes the signup page markup?
    – Which theme are you using
    – Is the site live/have a staging environment where I can see the registration page? If yes, please share a link.

    Please let me know the details and I will assist. Feel free to use private reply to this post if not comfortable sharing the details publicly.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56209

    I don’t use BP Member Types Pro anymore, I changed it to BP Profile Visibility Manager and Conditional Fields for Buddypress. This works better for my setup.
    But now Conditional Fields doesn’t work anymore.

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56210

    I’m not using any plugin that changes the signup markup. I’m only using BuddyPress Nouveau with the Kadence theme.
    The link to the registrationpage: http://www.plektrum.nl/register

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on #56211

    Hi,
    Thank you for the replies.
    I had a look.
    It seems there are no conditioned currently applied on the site. Please check the profile fields again and ensure you have conditioned. I dumped xpfields in console and it is showing empty conditional fields.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56212

    My current profile field setup:
    – All fields are in the same profile field group.
    – Display Name (core field)
    – Location (location field, required, visible for all member types)
    – Are you a parent or a young person? This is a Single Member Type field, Required, Options: Parent / Young person / User without member type. This field is supposed to control which additional fields appear.

    For each member type, I created separate fields.
    These fields:
    -are not required
    – are assigned to the correct member type (and also to “user without member type”)
    – are dropdowns or multi‑line text fields

    Each field has a condition:
    – Show this field if “Are you a parent or a young person?” = Parent
    or
    Show this field if “Are you a parent or a young person?” = Young person

    This used to work correctly.

    The problem is that the Single Member Type field does not trigger any conditional behavior anymore.
    When I change the value of “Are you a parent or a young person?”, nothing happens:
    – no fields appear or disappear
    – the conditional logic does not fire
    – the form does not react
    – and xpfields in the console is empty.

    So the conditions exist in the admin, but they are not being applied on the frontend.

    Does the Conditional Profile Fields plugin still support live conditional logic based on a Single Member Type field?
    Or should I replace this field with a normal select field to make the conditions work again?

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on #56213

    Hi,
    Thank you for the details.
    Please allow me this weekend to look into the conditional field and get back to you by Monday. For some reason, the javascript on your registration page has no information about the conditions. I will have better idea after looking at this plugin.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56214

    Hi,
    Just checking in to see if you’ve had the opportunity to look into the conditional field issue.
    Let me know if you need any additional information from my side.
    Kind regards,
    Irmgard

  • Participant
    Level: Initiated
    Posts: 9
    Irmgard van de Weijer on #56215

    Hi,
    Just checking in again.
    I’m still unable to proceed with the registration flow until the conditional field issue is resolved.
    Could you let me know when I can expect an update?
    Thanks,
    Irmgard

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on #56216

    Hi Irmgard,
    I am very sorry, I could not spend time on conditional field. I will get back to you within next 24 to 36 hours with the proper answer/solution after investigating the issue.

    Regards
    Brajesh

The topic ‘ [Resolved] Conditional Fields for Buddypress doesn’t work’ is closed to new replies.

This topic is: resolved