Join our new community forum for support & discussion

Join Now

Home Support Themes RentalHive Profile picture required

Profile picture required

  • Author
    Posts
  • gogorents

    The code in this post only works for existing users by the time of implementing the code.

    https://hivepress.io/support/topic/profile-picture-required/#post-10838

    As for users who signed up after that, the code doesn’t trigger the “Complete profile” pop up when click on submit listing button, instead it redirects users to homepage.

    I’ve tested many times, quite sure this is the case. Any solutions for this?

    ihor developer

    Please try using only this snippet instead:

    add_filter(
    	'hivepress/v1/forms/user_update/errors',
    	function( $errors, $form ) {
    		$user = $form->get_model();
    
    		if ( $user && ! $user->get_image__id() ) {
    			$errors[] = 'Please upload the profile image.';
    		}
    
    		return $errors;
    	},
    	1000,
    	2
    );

    It should trigger the image error in all profile forms, including the Complete Profile form. The Complete Profile form appears only if you add at least 1 required vendor attribute (or make one of the default fields required via the code snippets).

    gogorents

    Unfortunately, this code still won’t trigger the Complete Profile form, users can carry on with posting a listing without a profile picture.

    Anyway, it is not an urgent matter. I will wait for future updates for this type of feature to become available. Thanks for the great work you’re doing.

    artshareco

    I agree. It would be great if there was a way to make adding a profile picture a requirement in the complete listing form.

    ihor developer

    Thanks, we’ll check this before releasing the next HivePress version, it seems that the file/image fields “required” property works a bit differently.

Viewing 5 posts - 1 through 5 (of 5 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.