Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to DIsplay Only Required Fields on Signup

Viewing 7 replies - 1 through 7 (of 7 total)
  • Whoops , it stripped the code… lemme try again:

    Does this part of the profile loop accept any parameters?

    For example I’d like to only include the name field, which is the core field that is required, and not all the other extra fields. So I tried this but it does nothing:

    Since that’s the only required field I have, it would work if I can customize the loop to show only required fields, only that one field, or a max=1 but none of those seem to work. This is on the signup page, by the way. Is there an easy way to do this that I’m missing? Could anybody point me in the right direction? Thanks!

    Does this part of the profile loop accept any parameters?
    while ( bp_profile_fields( ) ) : bp_the_profile_field( );

    For example I’d like to only include the name field, which is the core field that is required, and not all the other extra fields. So I tried this but it does nothing:
    while ( bp_profile_fields( ‘field_id=1’ ) ) : bp_the_profile_field( );

    Since that’s the only required field I have, it would work if I can customize the loop to show only required fields, only that one field, or a max=1 but none of those seem to work. This is on the signup page, by the way. Is there an easy way to do this that I’m missing? Could anybody point me in the right direction? Thanks!

    Not bp_profile_fields; function bp_has_profile() does if that’s any use? It only takes user_id and profile_group_id.


    Brajesh Singh
    Participant

    @sbrajesh

    that’s easy to do. I had posted a solution for showing all the fields from all the profile groups on a buddypress install which is here
    http://bpdev.pastebin.com/RLreXE7X

    You just need to modify the while loop, well, I have already modified it.
    here you go
    http://bpdev.pastebin.com/0GeJKXUj
    Let me know if it works for you or not


    Boone Gorges
    Keymaster

    @boonebgorges

    The operative lines in Brajesh’s code are 62-64 :)


    Brajesh Singh
    Participant

    @sbrajesh

    hey Boone, you got me :)
    Yes, the operative is the line which @boonebgeorges mentioned. But the file is itself more versatile than the default bp-register.php to allow you show all the profile field groups fields and so on.
    Must check line 157 to 160.
    But for sarah’s case, that is not required :)

    Yes it works great! Thanks Brajesh!!! I don’t know why I was spending so long busting my brain to find parameters that would modify the loop ;) Should have posted here a couple hours ago. haha

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to DIsplay Only Required Fields on Signup’ is closed to new replies.
Skip to toolbar