Jump to content
  • 0

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


roattw

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

Link to comment
Share on other sites

4 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/

 

Link to comment
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>

 

Link to comment
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...