Hide Prosites signup registration form

Hey,

I have ProSites installed and would like to know how I can revert the registration form back to hidden.

For example, a user clicks the signup button and the screen scrolls down to the registration form but if I want to hide it again how could I do that with a link or button so that once it is clicked the registration form will be hidden again?

Let me know!

Thank you,
Landon

    Sajid

    Hello Landon,
    Hope you are doing good today

    I am sorry but there is no way out of the box to add button that will hide registration form at the moment.

    However, I can try to flag one of our developer to provide us a quick snippet for this if possible. Please note developer response might be slower than normal support staff response so we appreciate your patience.

    Best Regards,
    Sajid

    Landon

    Hi Sajid,

    Well I was inspecting the code and it seems like the checkout.js file removes the 'hidden' class on id prosites-signup-form-checkout for the form to appear.

    else {
                var checkout_form = $( '#prosites-signup-form-checkout' );
                checkout_form.removeClass( 'hidden' );
                scroll_top(checkout_form);

    So I am assuming that I would just need to add another elseif statement with a

    checkout_form.addClass('hidden');

    If you could ask your developer the best way to set the class to 'hidden' and let me know I would really appreciate it.

    Thank you,
    Landon

    Panos

    Hi Landon ,

    You are right, you can use that script you mentioned to hide the form again. I would recommend thought to add that script in your theme's functions.php or a mu-plugin and add a "Cancel" button next to the "Reserve your site" button. You can use the psts_checkout_after_free filter to hook like following snippet:

    function wpmudev_ps_checkout_hide_form_button( $output ){
    
    	ob_start();
    	?>
    	<script type="text/javascript">
    
    	(function($){
    		$( document ).ready(function(){
    
    			var reset_button = '<input type="button" id="wpmudev-prosite-hide-form" value="Cancel" style="margin-left: 20px;" />';
    
    			$( '#check-prosite-blog' ).after( reset_button );
    
    			$( '#prosites-signup-form-checkout' ).delegate( '#wpmudev-prosite-hide-form', 'click', function(){
    				$( '#prosites-signup-form-checkout' ).addClass( 'hidden' );
    			});
    		});	
    
    	})(jQuery);
    
    	</script>
    
    	<?php
    
    	return  $output . ob_get_clean();
    
    }
    
    add_filter( 'psts_checkout_after_free', 'wpmudev_ps_checkout_hide_form_button', 10 );

    Hope this helps!
    Panos