Altair Posted June 19, 2020 Report Share Posted June 19, 2020 I am having trouble hiding login forms in responsive mode. I have followed this article: https://howto.caspio.com/authentications-and-connections/authentication/hiding-multiple-login-forms/ Quote Link to comment Share on other sites More sharing options...
Nuke354 Posted June 19, 2020 Report Share Posted June 19, 2020 <script> var v_dpTotalCount = 2; var v_dpCounter = 0; </script> <!-- DEPLOY CODES HERE--> <script> document.addEventListener('DataPageReady', function (v_e) {try{document.getElementsByName('cb-auth-box')[v_dpCounter].parentNode.parentNode.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].parentNode.parentNode.style.display="none" ; } try{document.getElementsByName("cb-auth-box")[v_box].parentNode.parentNode.style.display="";}catch(v_e){ console.log("Error"); } } } }); </script> I have tried this one as a workaround for responsive pages. I just changed .style.display = "none" to .parentNode.parentNode.style.display="none" Hope this helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.