Viewing 6 replies - 1 through 6 (of 6 total)
  • DAM

    (@damland)

    +1

    I have the same question

    Good 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 you like some of 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>
    Mickey

    (@minglonaire)

    A bit of a newbie here, is this where this code is supposed to be entered?

    Editing buddypress-upload-avatar-ajax/bp-signup-avatar.php ?

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

    Never modify a plugin file directly!
    You will lose this modifications when plugin be update.

    Consider creating a Child-Theme to add the changes for the same reason.

    The place of this file depend of the theme you use.
    Must to be in wp-content/themes/name_of_your_theme/register/register.php

    Mickey

    (@minglonaire)

    ok thanks Jose
    Plugin does not work on mobile so I dont think I will use it after all.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to made this mandatory (required) field?’ is closed to new replies.