Skip to:
Content
Pages
Categories
Search
Top
Bottom

Interactive Profile Fields During Registration


  • David Veldt
    Participant

    @davidveldt

    Hello Everyone,

    I believe this topic has been asked before, and I’ve seen it on the WordPress forum but it hasn’t been resolved, so I wanted to bring it up again.

    I’d like to make my registration form a little more interactive. Meaning, different profile fields depending on which type of user you select at the beginning. On my site (an athletic site), users can indicate whether they are a player, coach, parent or instructor. If you are a player, I want questions pertaining to their position, for example, to show. If you are an instructor, you may be interested in displaying your company name or website and so on.

    Does anyone have any ideas on how to accomplish this? Currently, profile fields are heavily geared towards players and it seems awkward for other users. Any ideas would be much appreciated. Thanks in advance

Viewing 25 replies - 1 through 25 (of 34 total)
  • Sounds like a lot of info for the sign up form. What about jus putting a dropdown with the ‘person type’ in the first profile field group (which is the one that appears on the registration page by default), and then putting further type-specific fields into their own profile groups.

    With a little bit of coding, you can deny visibility or access to these other profile groups depending on user type, without too much diffficulty.


    David Veldt
    Participant

    @davidveldt

    Hmmm good point. Definitely worth checking out, however I still run into figuring out how to show/hide info depending on what they select from the drop-down. Not sure how to go about this…


    Marcella
    Participant

    @marcella1981

    Just an example here, running with Paul Gibbs start point.

    Create xprofile fields as normal.

    Each career group would also have its own xprofile group.

    Player would have his / her own set of fields.
    Coach would have his / her own set of fields.
    Parent would have his / her own set of fields.
    Instructor would have his / her own set of fields.

    None of the above would be required fields. (as far as BuddyPress is concerned (unless you roll some PHP codes))

    You’d have another xprofile group specifically for required fields (this would be your first group).

    You would make the “type” part of the required group and set it as a select box.

    You could then write your registration form mark-up matching the requirements of jQuery tabs or jQuery accordion.

    The “type” would be the last item on the required fields. Once that was selected you could then show or hide the corresponding jQuery ui-tab-panel that holds those form fields.

    You could then on-the-fly make those fields then required using some jQuery also but a bit hacky.


    David Veldt
    Participant

    @davidveldt

    @Marcella,

    Yeah, that’s how I pictured it as well. Trouble is, I’m not great with jQuery so that’s going to take some studying up. This project might be saved for a rainy day.


    Marcella
    Participant

    @marcella1981

    Oh I can help you with that, lemme set up a local test area.


    Marcella
    Participant

    @marcella1981

    Hey @davidveldt this should do it if you are using the default theme. Otherwise you should integrate as you see fit.

    theme/registration/register.php

    You can add any groups or fields as you require. The groups and fields here are arbitrary.

    ` ‘player’, 4 => ‘coach’, 5 =>’parent’, 6 => ‘instructor’); ?>

    $role) : ?>
    <div id="” class=”role-fields”>

    <label for="”>

    <textarea rows="5" cols="40" name="” id=””>

    <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="” />

    `

    Create some profile groups to cater for each role. You can find the group id within the BuddyPress admin… In the url bar or investigate your database.

    You should set-up the $roles array above to match your requirements.

    Within the loop you can show any fields you have created within that xprofile group. If you have a select box within that group you would add the following code as outlined in the bp-default register.php

    `

    <label for="”>

    <select name="” id=””>

    `

    Finally add the following jQuery where you house any other code of similar ilk.

    `
    jQuery(“.role-fields”).hide();
    $roles = jQuery(“#roles”);
    jQuery(“#field_2”).change(function()
    {
    $role = jQuery(this).val().toLowerCase();
    jQuery(“.role-fields”).hide();
    jQuery(“#” + $role).toggle();
    });
    `

    Here’s a pastebin for all that above. http://pastebin.com/QFdTdstz

    No need for tabs or accordion this time.

    Hope that helps you on the Road.


    bojan85
    Participant

    @bojan85

    not to hijack this thread but Wow this was exactly what I have been looking for but being a beginner this would be hard for me to implepement….no thoughts of relasing this as a plugin marcella?


    Marcella
    Participant

    @marcella1981

    hey dude, all depends on how many people would want it as a plugin and it may have already been done before.

    with David having a very specific case it was ok here but would need some more work to be practical.

    if you need some help getting something like this working you could describe what you need, what theme you have etc and maybe take it from there.


    David Veldt
    Participant

    @davidveldt

    @Marcella,

    Wow! What a thoughtful and detailed reply! Thank you so much for all of this.

    ps. A plugin would be AWESOME – you now have 2 votes (gotta start somewhere!)


    Marcella
    Participant

    @marcella1981

    If you could stub out the functionality of the plugin I’d be happy to consider it :)


    bojan85
    Participant

    @bojan85

    @marcella1981,

    Hey Marcella, first of all thank you for taking the time to help us, What I am trying to do is very similar as david have two different registration forms depending if their user role is an athlete or coach. I have the regular Bp default theme with the frisco theme, and latest wp and bp.

    I have been trying to figure it out for a couple days but cant seem to move forward..where in the register.php do i enter the php code and jquery script? I tried a couple different places..I have matched the group fields with the $roles array I’m guessing thats the only thing im doing right so far…

    Sorry for the all the questions I am a beginner at all this..Any tips or help how to move forward would be greatly appreciated!


    Marcella
    Participant

    @marcella1981

    Hey @bojan85

    Guess there is a small need for a plugin like this.

    I’m trying to visualise how you would configure a plugin to meet the requirements you need and also any others like @davidveldt

    Possible scenarios?

    Multiple routes for registration depending on which items were selected at the “required” stage.

    If this was to come “out the box” with BuddyPress, how would you expect to set this registration up within wp-admin / bp-admin?


    bojan85
    Participant

    @bojan85

    @marcella1981
    I think a plugin would be a great addition to bp..I would believe more users would like to be able to create different registration profile fields for different users (dating sites, networking sites, job sites etc.,..that’s a good question..maybe something simple in the bp admin like the buddypress user account type plugin…or maybe is it possible to create the plugin as add on to the main Extended Profile Fields menu?

    I wish I could be more of a help..
    Cheers, Bojan


    abysshorror
    Member

    @abysshorror

    @marcella1981 +1 plugin :)


    Marcella
    Participant

    @marcella1981

    Thinking something like this.

    Still struggling to see how it would work for more than the 1st stage / 1st option directing to the xProfile Group associated with that.

    Although that might be my lack of understanding the possible direction a user may take when building out their registration fields.

    This interface might confuse users, Google + / Groups / BuddyPress / ahhh head aches.

    Will probably opt in for a simple drop down on either side.

    View post on imgur.com


    bojan85
    Participant

    @bojan85

    Wow that looks great!! So if I understand it right depending on what role the user selects on the drop down menu at the buddypress registration the relevant registration form will show up below?

    The screenshot looks awesome and I think the ability to direct users on 1st stage to specific xprofiles group will be a much needed addition to bp, especially for us novices


    Marcella
    Participant

    @marcella1981

    Hi man, yeah pretty much. You’ll connect the dots in the back-end and the previously discussed functionality will be applied on the front.

    Does seem fairly bespoke though, and wouldn’t necessarily define this as “much needed” as the information can always be captured later.

    All depends on the audience though, also…. if you need to capture specific information from others and don’t care how they use the site afterwards then you could use a Gravity Form.


    David Veldt
    Participant

    @davidveldt

    @Marcella,

    Although most of this is way over my head, it looks like you’re on to something great. Let me know if there’s anything I can do to help!


    bojan85
    Participant

    @bojan85

    @marcella1981, that sounds awesome, please let me know if there is anything I can do to help.

    Cheers,


    jaimebib
    Participant

    @jaimebib

    Any news on this?


    rossagrant
    Participant

    @rossagrant

    This looks like the exact kind of thing that I could do with.

    I have a site for actors where actors can network.

    So that the profiles are uniform and can be searchable, I HAVE to set many fields as required.

    I don’t want people signing up with incomplete profiles as it looks bad, so I have to have required fields.

    I want to now enable industry businesses like photographers etc to sign up, and they will need a business profile.

    The profile can be the same fields for all business that sign up, (they can select a business type as the first drop down) but the business profiles will obviously require different fields to the actors.

    I’ll need things like business name, an about us text field, web address and contact info.

    Would this plugin be suitable for that?

    Any guidance on how this would be possible would be great!

    Ross :)


    bojan85
    Participant

    @bojan85

    Could this plugin be the solution for this problem? https://buddypress.org/community/groups/buddypress-conditional-profile-field/

    Anybody got this plugin to work? Seems non-functional to me…


    Sabrin_N
    Participant

    @sabrin_n

    OMG, this is almost what i need :) do you already have it working @davidveldt ?

    what i need is:

    you have the registrationform, the only things i want visible is Name and Email. and then i would like to have a selectbox with 2 options: Company or Student.

    When you register as a company and then login you go to the company profile side. if you are a student then you go to the student profile side. The 2 profile have different profile groups to fill out.

    how can i do this?


    jaimebib
    Participant

    @jaimebib

    @bojan85 tried to work with this plugin aswell but seems non functional..anybody involved in developing for bp who knows if this is even possible to do? Seems like a very basic function that should be included…


    bojan85
    Participant

    @bojan85

    @jaimebib nope still no luck for me I have basically given up on this plugin since I cannot seem to reach the author of the plugin..
    @Marcella any news on the idea you had for developing the plugin?

Viewing 25 replies - 1 through 25 (of 34 total)
  • The topic ‘Interactive Profile Fields During Registration’ is closed to new replies.
Skip to toolbar