Viewing 5 replies - 1 through 5 (of 5 total)
  • I second the above request. Communities don’t feel the same without profile images.

    Thanks a ton for the nice plugin.

    ARCangelGIRL

    (@arcangelgirl)

    I would like to know too, how to make this “Upload avatar” field required in registration field.

    DAM

    (@damland)

    we all need it…

    My wish too!

    Ok guys.

    I created a snippet for this required field.

    Just add this code to the register.php theme template that is in use.

    It works for me as well, so I’m not going to develop a plugin so that you can turn on and off at will. Sorry, but I do not have much free time.

    I hope it works for you.

    <script type="text/javascript">
    // Función de validación
    function validateUserAvatar(){
    	//NO cumple longitud minima
    	if ( jQuery('#tutviet-avatar-wrapper').find('#tutviet-signup-avatar > img').length == 0 ) {
    		alert('No ha incluido ninguna imagen para su avatar');
    		return false;
    	} else {
    		return true;
    	}
    }
    
    // Envio de formulario
    jQuery("#signup_form").submit(function(){
    	if( validateUserAvatar() ) {
    		return true;
    	} else {
    		return false;
    	}
    });
    </script>
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Required field’ is closed to new replies.