I have an account role “Customers” to which I want to assign a code that means that when they go to a view on the app they will have to enter that code to see the view.
My idea, somehow is that these codes would be assigned to a specific “Client” user role - I would add the access code to their Account Role (so they can update it whenever they want on the account settings page.
Does anyone know how I might setup a page where the user has to submit a form which just includes this access code?
Why not just use the Customers role as the page security, negating the need for a special code?
OTOH, if you want different customers to have different codes so they can see different views you could hard code the Page Rules to hide certain views depending upon the code.
What’s the difference between the Customers role and the Clients role?
I want people to have to enter a code into a page in order to see a view where there is a form. These people will have been previously sent a code by email so they know what to create.
That code will stored in the account details section of the “Client” role.
When the people enter the code the will be able to see a page where the corresponding form associated with the Client role will be shown.
That to me sounds feasible off the top of my head. Does it sound the same to you?
Your explanation was okay originally, I think. It just doesn’t tell us why you want to use a code vs. a simple role. But I digress. I think the problem is that Knack doesn’t allow us to create variables. So, for example. If you could open a page with a “field”, but really just a variable, enter the code into that variable, and if the code matches the account value, open your page. The value of the variable wouldn’t be saved, so next time the user would do the same thing. This probably requires a custom JavaScript solution.
I wanted a code because to give a customer a username and password is too complicated and prone to errors, whereas if a Client sends a code and a link, most people can manage that without getting into problems. By attaching it to the Client account profile it gives Clients the ability to regenerate a new code periodically the form page.
Okay, but this is a “hardcoded” solution. In order to change the code the builder first has to go into Knack and manually change the value in the submit rule.