Display icons based on 2 conditions

Hello, I need help with Adalo.

My goal:

Display the correct icons (:locked: / :key:) in a list of text content blocks based on the user’s status:

  • Free user (not registered) → Sees :locked: on “registered” blocks and :key: on “premium” blocks.
  • Registered user → Sees :key: on premium blocks.
  • Premium user → Sees no icons (full access to all content).

This allows the user to know whether a content block in the list is accessible or not based on their status: free, registered, or premium.

How can I make the icons appear or not on a content block in the list depending on their profile? The “visibility” function for an icon only accepts one condition, but I need two. For example:

  • If the block is “registered” and the user is free (user_type is NULL)
    :right_arrow: Set visibility_status to “show_locked_registered”

If you can help me solve this issue, I’ve been stuck on it for 3 days… Thank you so much.

Pascal

Hi @Pascal

Welcome to the community. Based on your notes, I think you can use a button here without a label (Layout: Fixed & Aligned Correctly). You can activate the other states and apply a conditions on those states. You can also apply no icon visibility to the button itself (not under the active states).

Thanks
Shantanu

Hi Pascal, you can add 2 conditions by applying one condition to the component, creating a group (for that one component with one condition), and then applying second condition to the group.

Thank you. I’ll try this.

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