JanineB Posted September 27, 2018 Report Share Posted September 27, 2018 I want my user to be able to log-in to the Webpage, when and only when the admin has approved his account. We have a checkbox field (Approved) that can identify if the user is approved by the admins. How can I have a conditional log-in form? Quote Link to comment Share on other sites More sharing options...
0 Aether Posted September 27, 2018 Report Share Posted September 27, 2018 Hi @JanineB, You can create a single Log-In screen for this. Alter the code provided in the documentation just add (& "[@authfield:Checkbox]" == "1"). This action is just to identify if the checkbox is checked or not. Quote <script> if("[@authfield:User]" == "Yes" & "[@authfield:Checkbox]" == "1"){ window.location = "Home Page URL"; } else if("[@authfield:User]" == "Yes" & "[@authfield:CheckBox]" == "0"){ window.location = "Log-In URL"; } else{ window.location = "Log-In URL"; } </script> Please note that in checkbox (Yes/check = 1) and (No/uncheck = 0) You can refer to this documentation: https://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/ I hope this helps FinTheHuman 1 Quote Link to comment Share on other sites More sharing options...
0 FinTheHuman Posted September 30, 2018 Report Share Posted September 30, 2018 This is exactly what I needed ! Thank you @WatashiwaJin ! Quote Link to comment Share on other sites More sharing options...
Question
JanineB
I want my user to be able to log-in to the Webpage, when and only when the admin has approved his account.
We have a checkbox field (Approved) that can identify if the user is approved by the admins.
How can I have a conditional log-in form?
Link to comment
Share on other sites
2 answers to this question
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.