Hide button forever

Hi guys.
I need my users to complete an action and once they submit some info they go back to homescreen, once they go back the button they pressed to go to the form they submitted needs to be gone, forever.

How can I do this?

I set for the button to be not visible once the user presses to go back to home, but if the user logs out and logs back in the button is there again.

Thanks!!

Show your (relevant) blocks.

Use TinyDB to store, if the button should be shown or not
See also the TinyDB tutorial at TinyDB - a persistent data solution - StevozApps
Taifun

2 Likes

@gopayarg

Once Screen.Initialized:

If tinyDb.GetValue “FormSubmitted” = true
hide SubmitButton

On SubmitButton.Click

tinyDb.SetValue “FormSubmitted” = true
hide button

2 Likes

Hi Hossein thanks for the response, ive set it up but now the button is hidden from the start even before the form is submitted:

Your block screenshot is cutting off. Please show entire block

Try this
bild

if you are not switching screen correctly in Kodular then add this one as well

bild

/Boban

1 Like

I see you’ve asked this question in Thunkable as well. Please only ask in the community of the builder you are using.

Thanks Boban, It did not work.

One clarification. I am not using diferent screens, Im using one screen with vertical arrangements that work as screens with visible true, false.

So the button that I need to hide is in one vertical arrangement and the form that I send to firebase via another button (and witch I need to use to trigger the other button being hidden) is in another vertical arrangement.

You can use the same approach for arrangements as well, maybe also add arrangement visible false under db store block

/Boban

Haven’t tested, but this should do it:

3 Likes

This did it! Thanks a lot!

It did it, thanks!!

Sorry, one issue though, It works fine for hidding the button, but it hides it for all users, I need it to hide for each user individually as each one of them submits their form.

Thanks!

That CAN NOT be. Every device is using its own TinyDB. If you are using same device for different users, then that’s another issue. Are you?

Ok!! Thanks!! I tried with two accounts and a single phone!

If you want multiple users to use same device, prefix the tag with account number

Ok, Thanks a lot for the help!!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.