On the sig-up page blog details YES button disappear when clicked

Hi,

When my members is signing up at the twiqstudio.com/sign-up page the box BLOG DETAILS (mine is called Portfolio details) is showing, but when clicked the box 'Yes, I'd like to create my portfolio' the fields under disappear. When clicking the 'complete sign-up' it shows up again, saying you need to fill in the fields. See attached.

Think that it is just a small mistake in the code somewhere? I've add' a screenshot of the code.

Actually it would be great if my members do not have the option to chose whether or not they want to create a blog/portfolio. I would like it to be *required if you want to become a member. Is this possible? :slight_smile:

Thanks in advance

  • Sajid
    • DEV MAN’s Sidekick

    Hi @TWIQ,

    Hope you are doing good today :slight_smile:

    Yes, I can see its giving validation errors even if its hidden.

    To make it required and remove the check box add following CSS custom code in style.css file of your child theme or use Simple Custom CSS plugin.

    #blog-details-section h4 + p {
    display:none;
    }

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • TWIQ
    • Design Lord, Child of Thor

    Hi again,

    Sajid, it did not work. Or yes - it deleted the button but when signing up now you don't get a site/blog. So if the box isn't there the user do not get a site. Weird!

    For now I will use it as it is (going online monday) - but what to do in the future? Is there another way to make it work, without the error?

  • Tyler Postle
    • CGO

    Hey TWIQ, I think one we need to do here is make that box selected by default. As long as it's selected then it should create the site when the form is complete. Also, if it's selected by default, then we can hide it too and it should still work as you would like it too.

    I'm going to mention this to @Sajid, he is a better coder than myself and we'll see if he knows of a solution to do this :slight_smile:

    Cheers,
    Tyler

  • Sajid
    • DEV MAN’s Sidekick

    Hi @TWIQ,

    Hope you are doing god today :slight_smile:

    I tried to recreate this issue on my own site with blog templates and BuddyPress registration but its working fine for me. For example the blog registration fields are hidden by default and when you click on checkbox then it reveals that section with blog templates. However on your site its opposite and don't toggle on click.

    Upon further troubleshooting I saw you have a custom JS code that is breaking this functionality.

    <script type="text/javascript">
    	jQuery(document).ready( function() {
    		if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
    			jQuery('div#blog-details').toggle();
    
    		jQuery( 'input#signup_with_blog' ).click( function() {
    			jQuery('div#blog-details').fadeOut().toggle();
    		});
    	});
    </script>

    I am assuming you added this to show the blog details section by default. Right ? If yes then please delete above code and add following code instead (tested). It will show the blog details section by default and also hide the checkbox button.

    <script type="text/javascript">
    	jQuery(document).ready(function($){
    		//Trigger click on checkbox
    		$('#signup_with_blog').trigger('click');
    
    		//check the checkbox to create site
    		$('#signup_with_blog').attr('checked','checked');
    
    		//make it invisible
    		$('#blog-details-section h4 + p').css({
    												'opacity' : '0',
    												'height' : '0px'
    											});
    
    		//Always show blog details section
    		$('#blog-details').show();
    
    	})
    </script>

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.