Issues with frontend forms

Support MB User Profile Issues with frontend formsResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17885
    TravisEstesTravisEstes
    Participant

    Hey there! I'm having two issues with my forms:

    1) Seems Login only works when you do it twice
    2) My Profile form is not allowing Image Uploads or multiselect anymore. When I make it a frontend form attached to a Post Type, the Frontend Submission shortcode does give the user Image Upload + select options. But when I assign the same form instead to Users, suddenly those options disappear in the frontend form.

    Thanks for your help!

    #17896
    Anh TranAnh Tran
    Keymaster

    Hi,

    1) Do you have any code related to login? It seems to work fine in my test.
    2) Have you added proper permission for users to upload? Can you share your code?

    #17921
    TravisEstesTravisEstes
    Participant

    1) I'm going to double check that it's not just a caching issue 😉 with WPEngine

    2) Yes, I have! This is the code I added to functions.php:

    function mb_allow_subscriber_uploads() {
        if ( is_admin() ) {
            return;
        }
    
    // Replace 'subscriber' with the required role to update, can also be contributor.
    $subscriber = get_role( 'freelancer' );
    $subscriber->add_cap( 'upload_files' );
    
    }
    add_action( 'init', 'mb_allow_subscriber_uploads' );

    Note that I actually have TWO roles that I'll need this for, not just one. Unsure how the code needs to change to account for two roles.

    #17928
    TravisEstesTravisEstes
    Participant

    Follow up:

    1) Was a caching issue!

    2) This is still broken. It seems my multiselect and slider tools don't work either. Note that this only happens when I attach the metaboxes to Users instead of a Post Type. Otherwise my users would have no issue...but I kinda need these fields mapped to Users 😉

    Made a video of the issue if it helps:

    https://www.loom.com/share/65acd0696b75436cad30c8f6be599059

    #17948
    Anh TranAnh Tran
    Keymaster

    I see. Thanks for your video.

    That might be a problem of enqueuing assets on the front end for user profiles. I've just fixed in the latest version. Please update and try again.

    #17949
    TravisEstesTravisEstes
    Participant

    OH MY GOSH THAT WORKED! Thank you Anh, you are a rockstar!!!!!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.