Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • omkarsawant1
    Participant

    @omkarsawant1

    hello,
    have a function set up in my register.php that copies the user-supplied username (in the registration form,) copies it over to the “Display Name” field, and hides the display name field on the registration form. This way, whatever the user entered for username will automatically be used for his/her display name. (To avoid asking the user for a name 2 times!)

    Would you like to do this? If so, I’d be glad to share my register.php file with you. Let me know. If this is not what you need, then please disregard this message.


    omkarsawant1
    Participant

    @omkarsawant1

    hello,
    add_action(‘bp_after_profile_edit_content’,’edit_appointment_settings_xprofile’);

    // Displays Editable Fields for Appointments+ email and phone
    function edit_appointment_settings_xprofile(){
    // Only Logged in users can make these edits
    $profileuser = wp_get_current_user();

    ?>
    <h3><?php _e(“Appointments+ Settings”, ‘appointments’); ?></h3>
    <form method=”post” action =” “id=”appointment-edit-form” class=”standard-form”>
    <table class=”form-table”>
    <tr>
    <th><label><?php _e(“My email for A+”, ‘appointments’); ?></label></th>
    <td>
    <input type=”text” style=”width:25em” name=”app_email” value=”<?php echo get_user_meta( $profileuser->ID, ‘app_email’, true ) ?>” <?php echo $is_readonly ?> />
    </td>
    </tr>
    <tr>
    <th><label><?php _e(“My Phone”, ‘appointments’); ?></label></th>
    <td>
    <input type=”text” style=”width:25em” name=”app_phone” value=”<?php echo get_user_meta( $profileuser->ID, ‘app_phone’, true ) ?>”<?php echo $is_readonly ?> />
    </td>
    </tr>
    <input name=”action” type=”hidden” value=”save_xprofile” />
    // Add other fields like location etc .. here if needed

    </table>
    <div class=”submit”>
    <input type=”submit” action = “” name=”appointment-edit-form-submit” id=”appointment-edit-form-submit” value=”Save” />
    </div>
    <?
    regards
    omkar
    https://luckypatcher.pro/ https://kodi.software https://plex.software/

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar