BuddyPress LOGIN based on Gravity Form???

Currently we are building a multisite website including buddypress; visitor have to signin to see the content. We built a form with gravity… page slug ? /mainpage/visitor-register to become a user. Here are our questions:

1) We are wondering, if one is signing up using the gravity form does this persons details go into the same user database which is available within Wordpress User?
2) Where do we find the list with all those countries and how do we implement this list that a new visitor can select the country out of a drop-down list?
3) Obviously when user are signing in they get the wordpress login screen. does this mean they land automatically on the wordpress dashboard like we... where they would be able to setup pages, posts etc.? If so, how to avoid such a login for useres... we will let them have access to our website content only but never with any access to the wp dashboard?

Thanks
Prinz

  • aristath

    Hello there @Prinz, I hope you're well today!

    1) We are wondering, if one is signing up using the gravity form does this persons details go into the same user database which is available within Wordpress User?

    Yes, it's on the same database.

    2) Where do we find the list with all those countries and how do we implement this list that a new visitor can select the country out of a drop-down list?

    I'm afraid I don't understand what you mean here... What countries? I don't know what you're referring to... could you please provide some more info?

    3) Obviously when user are signing in they get the wordpress login screen. does this mean they land automatically on the wordpress dashboard like we... where they would be able to setup pages, posts etc.? If so, how to avoid such a login for useres... we will let them have access to our website content only but never with any access to the wp dashboard?

    You can use this plugin to redirect them to another page once they login: https://premium.wpmudev.org/project/login-redirect/
    If you want to disallow access to your dashboard to anyone but yourself, you can add this in your theme's functions.php file:

    /*
     * If user is not an admin, do not allow access to the dashboard AT ALL.
     */
    function custom_remove_no_admin_access(){
        if ( ! defined( 'DOING_AJAX' ) && ! current_user_can( 'manage_options' ) ) {
            wp_redirect( home_url() );
            die();
        }
    }
    add_action( 'admin_init', 'custom_remove_no_admin_access', 1 );

    I hope that helps!

    Cheers,
    Ari.

  • Klaus

    Hello Ari,
    many thanks for prompt reply which is helpful for us. Now to clarify our "country" question... what do we mean by that: Often when you sign up lets say for a notification and/or purchase, membership or whatoever the presented signup form includes usually a field asking e.g. to enter the country code and/or long name of a country where we reside. Then by clicking on drop down list all countries on this globe are listed and a signing in user has simply to select the country he/she once before continuing to filling all other requested form fields.

    Hopefully this helps to understand what we would like to do. We are wondering, where in the wordpress world do we find a table including all those many country (instead entering each country manually).... next how to implement such a table in our own signup form... either using the user registration form or alternatively creating a dedicated Gravity sign-in form for user.

  • Ash

    Hello @Prinz

    I hope you are well today.

    You can try to use a country database like: https://github.com/raramuridesign/mysql-country-list/blob/master/mysql-country-list.sql

    Make sure you add the database prefix in the create table command like wp_countries.

    Then you can run query to get the value from country table and populate the select the dropdown. Here is an example: http://wpquestions.com/question/showChrono/id/9188

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.