Hide a page after clicking a button

Hi,
Is it possible to hide a page to a user after they click a button?

I have a coupon and on that page is a redeem button… Once they “redeem” the coupon, I want to hide that page from the user so they can’t redeem again. I’d also like it to show a blank page saying something like. It looks like you’ve already redeemed this offer.

Any simple solutions out there?

Thanks in advance

It’s ok, i found a solution from a previous enquiry. I have added a blank page and have an action that sends them to a specific page if the coupon has true/false redemption.

Hi @dcycasey,

If you store Coupons in a collection: you could add the “True/False” property to the coupon, call it, say, “Redeemed”. Set this to False upon coupon creation, and set this to “True” when user redeems the coupon.
Then you can set visibility for coupon itself using this property.

Best regards, Victor.

Thanks Victor, I did try this but i couldnt seem to get the relationship between user and coupon sorted. I may have set my database up wrong or something so will keep trying, thanks

Hi @dcycasey,

Ok, I see. You’d like to have one coupon entry, accessible by many users?

If yes - you need to set up a Many-to-Many relation between Users and Coupons (User can have many coupons, and coupon can have many users). By default the relation is empty. User can view the coupon’s list, then select the coupon (next screen with Current Coupon), and redeems it. Upon redemption, you add Logged-In user to the relation.

And list itself should be filtered by the rule “Current Coupon -> User” doesn’t contain Logged-In user. Redeemed coupons will not be available then. You could also add similar visibility rule on the coupon details page.

As I think, such setup should work :slight_smile:

Best regards, Victor.

Thank you Victor, I’ll have a mess around with it and see if i can figure it out :slight_smile:
Much appreciated

1 Like

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