Using imported snippet

Hey! i'm just wondering if it is possible to achieve the following:
I have a snippet that uses an imported snippet that consists of a dropdown list.
I want a certain part of the text to change to the appropriate one, each time I select from the imported snippet.
Is it possible to achieve and can some one point me out the direction?
Thanks in advance!

Hey Alex,

Welcome to the Text Blaze community!

If I understand correctly, you have Snippet A that imports Snippet B. Snippet B contains a dropdown list, and you want different text to appear in Snippet A when you select the dropdown from the imported snippet?

If that understanding is correct, then it's definitely possible. In the snippet that you're importing, make sure that your dropdown list has a name assigned to it. Then, in the snippet that's doing the importing, you can write {if} statements that use that name.

For instance, if the dropdown menu I'm importing has the name of "dropdown", I could do something like this:

{formmenu: a;b;c; name=dropdown}
{if: dropdown=="a"}text to display when A is selected{elseif: dropdown=="b"}text to display when B is selected{else}text to display when C is selected{endif}

We can't demo imported snippets in the community, so just pretend that my formmenu called "dropdown" is being pulled in through an import instead of being written right in the snippet.

1 Like

yes, that is exactly what I wanted to achieve. thanks a lot!