Default Data in Profile Fields For Real BuddyPress Users

Is there an easy way to create default data in profile fields for real BuddyPress users? For example, when a real user registers for a site, a text field would already have default words put in my the admin. The user could choose to keep the default words or change it.

Please respond soon.

  • Ash
    • Code Norris

    Hello @wainwatkins

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    This might be possible with some custom code. Would you please share me your registration page, which filed you want to have default value and what the value is, I will try to give you the code.

    Please let me know.

    Cheers

    Ash

  • Ash
    • Code Norris

    Hello @wainwatkins

    I hope you are well today.

    I will send you code based on your register form. So I will need the link of your register form and make sure that the profile field is already in there :slight_smile:

    Please let us know.

    Cheers

    Ash

  • Ash
    • Code Norris

    Hello @wainwatkins

    I hope you are well today.

    For example, for name field it’s ID is ‘field_1’. So you can add default value like the following code:

    jQuery(function($) {
    $('#field_1').val('My Name');
    });

    Currently this js code won’t work in your site. As I can see a js error is coming from your theme’s script.js file. Please fix the error first and then use my code.

    Feel free to let us know if you need more help on this.

    Cheers

    Ash