BuddyDev

Search

Problem with BuddyPress field using Xprofile Custom Field Types and Select2

  • Participant
    Salvador on #53516

    I recently wanted to use Select2 to customise the select box of a multibox field in the users profile. Additionally I am using the BuddyPress Xprofile Custom Field Types plugin to be able to automatically activate the select2 implementation, but I am having a problem.

    Apparently select2 is implemented correctly, I can do a filtered search for select box options. The problem is that these should be added as ‘tags’ in the field of the profile but instead it seems to add a ‘tag’ with all the select box options. It’s a bit complicated to explain, so I would like to share some screenshots where I show:

    1) Multi Select Box field of the user profile configured to use Select2
    https://drive.google.com/file/d/1nkGjl680sHDrr0an33F1gZVnt7E4xa_e/view?usp=sharing

    2) Field displayed in the frontend
    https://drive.google.com/file/d/1_aOQJLVJgeqSs3zadQDm2UKaXQSdJ5_A/view?usp=sharing

    3) Problem when selecting an option
    https://drive.google.com/file/d/1uMvDhDl_KSXF12Y79g-clUIdDiiJ8Pg6/view?usp=sharing

    At this point I tried to manually create a select box field on a different page of my website following the instructions in the Select2 documentation. To my surprise, on this page it works correctly as shown in the screenshot number:

    4) Field working correctly with Select2
    https://drive.google.com/file/d/1BXLVU3CVbM-iCl3qo8GlCzTnn4I2pji1/view?usp=sharing

    Could it be possible that the template used for the ‘Single Member Page Layout’ page does not support the code needed to use Select2? In my theme settings section I see that it is possible to choose between different layouts for BuddyPress like No sidebar, Left Sidebar, Right Sidebar, Two Left Sidebars, Two Right Sidebars and Right and Left Sidebars. I have tried using all of them but none of the layouts work correctly with the field with Select2 configured.

    However, on another page of my website that is not related to BuddyPress and uses the WordPress ‘Full-with page, No Sidebar’ layout, everything works correctly. That is why my question is if the layout used by the BuddyPress theme might not support the code necessary for Select2 to work.

    What could be happening? Thank you very much in advance

  • Keymaster
    (BuddyDev Team)
    Posts: 24774
    Brajesh Singh on #53526

    Hi,
    Thank you for reporting the issue.

    Please allow me to check and get back to you in next 24 hours.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved