Home Forums Plugin Support WP User Frontend Pro Category exclusions on form not working + BuddyPress integration won't link

This topic is: resolved

This topic contains 9 replies, has 2 voices, and was last updated by  Sekander Badsha 4 years, 8 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #23927

    RJ
    Participant
    Post count: 21

    Hey guys, great plugin.

    Having a couple of issues though which I hope you can help me with.

    1. When I create a form and add the Category field, I want to only display certain categories. So I add the Post Field of Category and select Include from the dropdown and type in the ID's of the categories I want to appear. It works fine with the Dropdown, Multi-Select, and Ajax options. But I want it to use the Checkboxes. With the Checkbox option though, it only displays the first ID that I put in. So if I want to include ID's 3,4,5,6 then it only gives me 3 as a checkbox.

    Could you please help me fix this?

    2. The other issue is with BuddyPress integration. I have the add-on installed properly (at least I think so). When I go to my registration form to edit it and add fields from BuddyPress, that tab displays this message: “No fields found in the form. Add fields first and update the form.” I'm not sure why it's showing this message because I have added fields under Users -> Profile Fields.

    Also, when I go to look at my BuddyPress profile from the front end, the same fields from the registration form don't show up either. I thought that was the point of the add-on, to sync these two things?

    Would really appreciate some help here.

    Thanks!!

    #24052

    Sekander Badsha
    Member
    Post count: 2067

    Hello Rj,

    1. I have checked the issue and got the same problem and reported to the developers. You'll get the fix soon. For the time being you can use the dropdown for categories.

    2. Here is the documentation for the buddypress plugin.
    http://docs.wedevs.com/buddypress-profile-integration-add-on/
    Please read them carefully. I believe you'll get a clear idea about the plugin from there

    #24057

    Sekander Badsha
    Member
    Post count: 2067

    Here's the fix:
    Open wpuf-functions.php which is located at “wp-content/plugins/wp-user-frontend-pro/” and go to line number 336 and you'll see a function named function wpuf_category_checklist you have to replace the whole function with the below one.

    [php]
    function wpuf_category_checklist( $post_id = 0, $selected_cats = false, $attr = array(), $class = null ) {
    require_once ABSPATH . ‘/wp-admin/includes/template.php';

    $walker = new WPUF_Walker_Category_Checklist();

    $exclude_type = isset( $attr[‘exclude_type'] ) ? $attr[‘exclude_type'] : ‘exclude';
    $exclude = explode( ‘,', $attr[‘exclude'] );
    $tax = $attr[‘name'];

    $args = array(
    ‘taxonomy' => $tax,
    );

    if ( $post_id ) {
    $args[‘selected_cats'] = wp_get_object_terms( $post_id, $tax, array(‘fields' => ‘ids') );
    } elseif ( $selected_cats ) {
    $args[‘selected_cats'] = $selected_cats;
    } else {
    $args[‘selected_cats'] = array();
    }

    $args[‘class'] = $class;

    $categories = (array) get_terms( $tax, array(
    ‘hide_empty' => false,
    $exclude_type => (array) $exclude,
    ‘orderby' => isset( $attr[‘orderby'] ) ? $attr[‘orderby'] : ‘name',
    ‘order' => isset( $attr[‘order'] ) ? $attr[‘order'] : ‘ASC',
    ) );

    echo ‘<ul class="wpuf-category-checklist">';
    echo call_user_func_array( array(&$walker, ‘walk'), array($categories, 0, $args) );
    echo ‘</ul>';
    }
    [/php]

    #26498

    RJ
    Participant
    Post count: 21

    Thanks for your help with the first issue, that code worked like a charm!

    The second issue remains a problem though. It seems that it won't recognize that I've created BuddyPress profile fields and is not displaying them in the BuddyPress tab when I go to edit my form. I followed the directions carefully from the link that you posted, so I don't know what's going wrong here.

    #26603

    Sekander Badsha
    Member
    Post count: 2067

    Hello Rj,
    I'm not clear about your problem. Can you please provide me some screenshot?

    #26638

    RJ
    Participant
    Post count: 21

    Yes, here are screenshots from my site.

    You'll see that I've created a couple of Profile Fields, but when I navigate to the BuddyPress tab of my registration form, it shows that I haven't created any. There is also a screenshot of my registration form to show that I have fields in there as well.

    Profile Fields – https://drive.google.com/file/d/0B-Idumtr5CHBWkNTbUxyZGs4VDQ/edit?usp=sharing

    Registration Page: https://drive.google.com/file/d/0B-Idumtr5CHBb0Z6ekJCNnAzd0U/edit?usp=sharing

    BuddyPress Tab: https://drive.google.com/file/d/0B-Idumtr5CHBaEo3R1NlQkZnZTA/edit?usp=sharing

    Also, am having the same issue as many other people with the latest update with the radio fields picking up all the options. I need a fix urgently as the website is being presented at a meeting tomorrow. What's the best way for me to revert back to the old version of the plugin without losing my forms or any other data? Thank you!

    #26762

    Sekander Badsha
    Member
    Post count: 2067

    Hello Rj,
    I have tested your issue and got the problem and already notified the developer team. Hope to get a fix soon.

    #26776

    Sekander Badsha
    Member
    Post count: 2067

    We have fixed the issue. Please update your add-on now.

    #26904

    RJ
    Participant
    Post count: 21

    Ok, it's working now, thank you for the fix!

    One question though – if I have a field with radio options in my BuddyPress fields, do I need to add those same fields over again into the registration form? I was under the impression that it would pick it up from BP.

    #27113

    Sekander Badsha
    Member
    Post count: 2067

    You have to link each and every field through the BuddyPress tab. Otherwise that field won't be displayed.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Category exclusions on form not working + BuddyPress integration won't link’ is closed to new replies.