Page creation with password

Hi, first of all I want to apologize for my English.
I am creating a game where users have to decipher the solution and I would like to protect some pages with my own password, which would be that correct solution (like a scape room).
I don’t know how I can create this field. Can anyone help me with this please?

Hi Judith, you could use an If condition flow function before Open page to check that the password is correct before showing the next level.

  1. Create page variable password

  2. Bind password to the value of an input field, this will update the value of password to what the user writes in the input field

  3. When user clicks ‘Next level’, check with an If condition if the password is correct, and only then open the page of the next level (in the example the correct solution is “correctPassword”)

Fantastic !! Thank you very much!
Now I have another question, I don’t know if it’s possible,
Is there any way that when scanning a QR code this takes me to a specific page of the app?
Thank again!

Hi Judith, if you check out the QR code scanner documentation it outputs the code content as a string. So to open a page after scanning the right code you could check what that string is with If condition, and then use Open page, similarly to what you do with the password. You can access the code content in a formula as outputs["Scan QR/barcode"].codeContent :slight_smile:

Fantastic !! Thank you very much! This has been a great help! :hugs:

1 Like

Another question on this subject, is it possible to incorporate several correct passwords? If so, how would it be done?

Hi, yes just change the formula to use the || (IF) operator to check for several correct passwords:

pageVars.password === "firstCorrectPassword" || pageVars.password === "secondCorrectPassword"

If you have like 100 correct passwords and checking for all of them separately is too much work, put them as initial values in a page variable of type “List of texts”, let’s call it correctPasswords and check for IS_IN_ARRAY(pageVars.correctPasswords, pageVars.password). :slight_smile:

Ok, thank you so much, it helped me a lot! :hugs:

1 Like

Hello, what if I want a page with a password that once the user enters the correct password, the page never shows again. ie. I want the if condition to automatically populate once the user has entered it once upon page reload.
More like an authentication/license page to ensure only specific people with the designated passkey/password can use the app. but do no have to enter the password every time the open the page/app
Thanks in advance

thats also what I was looking for, would be nice if anybody could help