Jump to content
  • 0
roattw

Hiding Multiple Login Forms - Does hide them, kind of.....

Question

Followed the instructions.

https://howto.caspio.com/tech-tips-and-articles/common-customizations/hiding-multiple-login-forms/

It does work, but when the page first loads you see a brief flash of ALL the login screens then they disappear.  Anything change with this code/suggestion for modern CSS or HTML to cause this behavior?

See attached screenshot video.  Watch bottom of screen - they flash by.

2018-01-24_15-43-48.mp4

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I would recommend you to create a single login instead as described here so whenever user logs out or timeout they will be redirected to this page: https://howto.caspio.com/authentications-and-connections/authentication/create-a-standalone-login-screen-2/

If you have multiple user access level you can use this one: https://howto.caspio.com/getting-started/create-user-specific-redirect-after-login/

 

Share this post


Link to post
Share on other sites
  • 0

You need to use this script in the article you have posted above

 

<script>
 var v_dpTotalCount = 3;
 var v_dpCounter = 0;
</script>
where 3 - the number of DPs deployed within the host page authenticated with the same auth. In case on specifying wrong number script will also work, but with redundant checks.

2. To replace script from option 7:
<script type="text/javascript">
                document.addEventListener('DataPageReady', function (v_e) {
                                try{document.getElementsByName('cb-auth-box')[v_dpCounter].style.display = "none";}catch(v_e){}
                                v_dpCounter +=1;
                                if( v_dpTotalCount <= v_dpCounter) {
                                                if(document.getElementsByName("cb-auth-box")) {
                                                                var v_box = document.getElementsByName("cb-auth-box").length-1 ;
                                                                for (i=0; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].style.display = "none" ; }
                                                                try{document.getElementsByName("cb-auth-box")[v_box].style.display = "” ;}catch(v_e){}
                                                }
                                }
                });
</script>

 

Share this post


Link to post
Share on other sites
  • 0

Not working.  Does this first part:

<script>
 var v_dpTotalCount = 3;
 var v_dpCounter = 0;
</script>

......Also get placed right after each piece of deployed CG datapge code? or just occur once somewhere else in document?  Or does that first piece go in the Authentication HEader?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×