• Hello,
    I have some problems with my code. I have created a custom tab with a html form.
    There is the tab but inside there is only the submit button and i don’t see the forms fields.
    I tried to assign a dimension but i haven’t resolved the problem.

    This is the code:

    add_filter('um_profile_tabs', 'add_custom_profile_tab_recensioni_nuova', 1000 );
        function add_custom_profile_tab_recensioni_nuova ( $tabs ) {
            
            $tabs['recensioni_nuova'] = array(
                                         'name' => 'Nuova Recensione',
                                         'icon' => 'um-faicon-comments',
                                         );
            return $tabs;
        }
        
        //Definizione Nuova Recensione//
        add_action('um_profile_content_recensioni_nuova', 'um_profile_content_recensioni_nuova');
        function um_profile_content_recensioni_nuova( $nuova )
        {
            $profile_id = um_profile_id();
            $user_id = get_current_user_id();
            
        echo"
            <form action='invia_nuova.php' method='post'>
            <imput name='scittore' type='hidden' value='$user_id'/>
            <imput name='ricevente' type='hidden' value='$profile_id'/>
            <imput name='punteggio' type='radio' value='1' size='20'/>
            <imput name='punteggio' type='radio' value='2'/>
            <imput name='punteggio' type='radio' value='3'/>
            <imput name='punteggio' type='radio' value='4'/>
            <imput name='punteggio' type='radio' value='5' size='50'/>
            <imput name='descrizione' type='text'/>
            <input type='submit' value='Invia'>
            </form>";
            
            return $nuova;
        }
Viewing 1 replies (of 1 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @meale,

    UM profile is already enclosed with <form> tag, it won’t work that way. you will need to catch the submitted post with UM action or template_redirect action to process it.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with profile tab’ is closed to new replies.