Make snippet differentiate between text fields

Hey guys!

Was just wondering if there's a way to make a snippet know where it's being applied to show different contents.

Just like how you would use {site:domain} to tell the snippet to show different things depending on the website you're in.

In this case, I'd like to, for example, apply the snippet in the main search bar of Salesforce and it's going to apply some text... but if I apply the same snippet in the body of the email, it does something else.

1 Like

Hey @Juan_Murillo, yes that sounds possible by using the {site: text; selector=} inside an {if} command.

Based on the selector of the field where you're entering the snippet, TB would produce a different output.

I'm afk right now, so I can't give you a proper example, but you can read more about those two commands in the documentation.

If you get stuck, let me know and we can work it out together.

1 Like

Mmm... I thought about that, but so far, I can only get it to check if the selector exists in the page, but it doesn't differentiate if the cursor is on that spefic selector.

1 Like

Ah, now I see what you mean.

Maybe a video call would make it easier to work something out. If that's convenient for you, please drop me a line on cedric@blaze.today and include the link to this thread for context.

We'll work something out :slight_smile:

1 Like