BuddyDev

Search

[Resolved] member type on registration

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2763

    Hi all! (new user here)

    First of all I wanted to thank you for this wonderful community!
    I’ve read and learned a lot here, and as a user of other kinds of communities, I need to tell you:
    You are one of the most friendly and fast-responding people I’ve ever seen.

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2764

    Is it possible to change the dropdown-list of the membertype-selection in the registration-process to radio-buttons?

    Example:
    [currenty]:

    —-
    membertype1
    membertype2

    [my wish]:

    °membertype1
    °membertype2

    Removing the “—-” and converting <option …> to <input type=”radio”…> would allow me to theme the radio-buttons with images, thus allowing a nice (maybe multi-stepped) registration process where a user just have to click the left or right image – e.g. Male-Female or student-teacher

    Thank you soo much

    Gratefully
    Blade

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #2772

    Hi Blade,
    Welcome to BuddyDev.

    Thank you for asking this.
    We will have it available in next 4-5 hours and I will post an update here.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2779

    Wow, Brajesh himself answered me. I’m feeling very honored.

    Thank you very much master!!

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #2782

    Hi Blade,
    Thank you for the kind words 🙂

    Please upgrade to 1.0.2 from here

    https://buddydev.com/plugins/bp-xprofile-member-type-field/

    and put this code in your bp-custom.php

    
    add_filter( 'bd_xprofile_field_type_membertype_as_radio', '__return_true');
    
    

    That will make it work as radio.
    Hope that helps. Please do let me know if that works for you or not?

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2786

    Oh my God Brajesh!! It works almost perfect!!!! Thank you sooo much master!!

    Radio-registration works perfectly, only one small visual “bug”:
    I think we need to add the new name/value-pair to the profile-loop?
    (i hope this is not a total noob-non-sense idea)

    Membertype does get assigned, but view profile doesnt show it yet.
    Edit-profile also doesnt show it, but that is ok, since I dont want to let the user change its value.

    [Im so sorry, that my english is soo underaverage. I hope it is understandable]

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2788

    Super cool master!
    I slightly modded “$new_html” in “class-member-type-field.php” for theming purposes.

    
    $new_html = sprintf( '<input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s" class="radio_item"><label for="%3$s" class="label_item" style="display: inline-block;"><span style="display:block; margin-top: 30px;">%5$s</span></label>',
                    $selected,
                    esc_attr( "field_{$this->field_obj->id}" ),
                    esc_attr( "option_{$member_type}" ),
                    esc_attr( stripslashes( $member_type ) ),
                    esc_html( stripslashes( $label ) ),
                    '../wp-content/themes/'.get_template().'-child'
                );
    
    

    and a little css:

    
    .radio_item{
    display: none !important;
    }
    
    .label_item {
    opacity: 0.2;
    }
    
    .radio_item:checked + label {
    opacity: 1;
    }
    

    It looks awesome master!! I would like to send you a picture or a video of my self-made multi-step-registration if you want.

    I mark this as resolved 🙂
    (would be awesome to make it visible in the profile)

    Cheers
    Blade

    • This reply was modified 6 years, 5 months ago by blade.
    • This reply was modified 6 years, 5 months ago by blade.
    • This reply was modified 6 years, 5 months ago by blade.
  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #2797

    Hi Blade,
    Thank you for the kind words.

    Can you please check this with twenty sixteen theme? I just checked and the Member types were listed on View profile /edit profile page.

    If you can help me find out the issue, I may be able to help.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    blade on #2825

    Dear Brajesh!

    You are absolutely right! EVERYTHING WORKS PERFECT!!!

    At this point I wanted to also thank you for your “username availability checker”.
    Together with some snippets I got a nice multi-step-registration without any extra plugins:
    I styled a little bit and made the “available” message an icon.
    (i know it still looks noobish, but im not a designer and still a beginner in wordpress)
    Here are my pics for you. (i would send you signup3.png – but in privat 😉 )

    Just your plug-ins, css-js-toolbox and my own childtheme:

    P.S.:Here is signup3.png – password via PM 😉

    • This reply was modified 6 years, 5 months ago by blade.
    • This reply was modified 6 years, 5 months ago by blade.
    • This reply was modified 6 years, 5 months ago by blade.
  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #2831

    Thank you.
    It looks awesome 🙂

You must be logged in to reply to this topic.

This topic is: resolved