Custom Fields
Re-Envisioned
Support MB User Profile Display edit user form on front end

This topic contains 3 replies, has 2 voices, and was last updated by  Eliodata 1 week, 1 day ago.

  • Creator
    Topic
  • #16401

    Eliodata
    Participant

    Hi,
    I pasted this code into my author.php file :

    <?php 
    $form = '[mb_user_profile_info id="untitled-field-group" user_id="36" submit_button="Submit" confirmation="Your information has been successfully submitted. Thank you."]';
    echo do_shortcode( $form );
    ?>

    It works displaying all the fields. But they are empty. I would like to be able to open each user profile and edit it front end. For example for the user “testuser” this page :
    https://mydomain.com/author/testuser
    should display the “testuser” datas, not an empty form.

    Can you help please ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #16402

    Eliodata
    Participant

    I pasted you the bad code sorry. here is the one I use, without user id :

    <?php 
    $form = '[mb_user_profile_info id="untitled-field-group" submit_button="Submit" confirmation="Your information has been successfully submitted. Thank you."]';
    echo do_shortcode( $form );
    ?>
    #16410

    Anh Tran
    Keymaster

    Hi Eliodata,

    To edit default user fields, please create a meta box that has the same fields as WordPress’s. Then add it to the shortcode. For details, please see the docs:

    https://docs.metabox.io/extensions/mb-user-profile/#edit-default-fields

    #16416

    Eliodata
    Participant

    Hi Anh,

    My question was not clear, sorry for my poor english. My user form is ok and works fine on admin, I’m just trying to display it and edit content front end.

    The page “https://mydomain.com/author/testuser1” should display results for “testuser” and the page “https://mydomain.com/author/testuser2” sould display results for “testuser2”. But it only displays empty forms.

    How can I edit user forms front end please ? I mean choosing the profil I want and edit his content.

    Have a nice week !

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

You must be logged in to reply to this topic.