# Help creating a multiple choice with conditional output options

**URL:** <https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235>\
**Category:** Have a question?\
**Tags:** tips, productivity, snippets\
**Created:** [May 21, 2025, 4:42pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235 "2025-05-21T16:42:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SethDimbert](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/sethdimbert/32/417_2.png) [@SethDimbert](https://community.textexpander.com/u/SethDimbert)\
**Post date:** [May 21, 2025, 4:42pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/1 "2025-05-21T16:42:56Z")

</div>

I want to create a snippet that leverages PopUps to let me choose between “Stacy will be providing tech support…”, “I will be providing tech support…”, and “Stacy and I will be providing tech support.”

I know how to do this. However, later in the snippet text, I say, “…so please send us materials…” and I’d like that to say “please send her” or “please send me” depending on which option I chose in the popup.

Is this kind of conditional possible?

---

<div class="post-metadata">

**Author:** ![josh.centers](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/josh.centers/32/8_2.png) [@josh.centers](https://community.textexpander.com/u/josh.centers)\
**Post date:** [May 22, 2025, 4:37pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/2 "2025-05-22T16:37:56Z")

</div>

Hi Seth, thanks for your patience. TextExpander doesn’t support conditionals. I think your most efficient solution would be to have three optional sections, each with the complete phrase. Would that work for your case?

---

<div class="post-metadata">

**Author:** ![HaniSarji](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/hanisarji/32/225_2.png) [@HaniSarji](https://community.textexpander.com/u/HaniSarji)\
**Post date:** [May 25, 2025, 1:53pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/3 "2025-05-25T13:53:26Z")

</div>

@SethDimbert Yes — what you’re asking for is totally possible with some JavaScript in your TextExpander snippet!

Here’s an example that lets you choose between different tech support statements, and then dynamically adjusts the pronoun in a follow-up sentence:

```javascript
//%filltop%
var supportChoice = "%fillpopup:name=Support Choice:default=Stacy will be providing tech support:I will be providing tech support:Stacy and I will be providing tech support%";

var pronoun = "her";
if (supportChoice.startsWith("I")) {
  pronoun = "me";
} else if (supportChoice.startsWith("Stacy and I")) {
  pronoun = "us";
}

var output = `${supportChoice}, so please send ${pronoun} the materials in advance.`;

output;

```

### What this does:

- You select one of three subject lines from the popup.
- The script sets the correct object pronoun based on your choice:
  - “her” if only Stacy is providing support
  - “me” if it’s just you
  - “us” if it’s you and Stacy together

- The final output ties it all together in a grammatically correct sentence.

Let me know if you want to build this out further with other variables like verb conjugations or possessive pronouns. Happy to help!

---

<div class="post-metadata">

**Author:** ![SethDimbert](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/sethdimbert/32/417_2.png) [@SethDimbert](https://community.textexpander.com/u/SethDimbert)\
**Post date:** [May 27, 2025, 1:37am UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/4 "2025-05-27T01:37:21Z")

</div>

That worked! It took me a minute to figure out how to create a Javascript snippet and embed that inside another snippet, but it works like a charm. Thank you so much.

---

<div class="post-metadata">

**Author:** ![loren](https://sea3.discourse-cdn.com/textexpander/user_avatar/community.textexpander.com/loren/32/28_2.png) [@loren](https://community.textexpander.com/u/loren)\
**Post date:** [August 26, 2026, 5:10pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/5 "2026-08-26T17:10:32Z")

</div>

Hey all 👋 Conditional Sections functionality is now available to all TextExpander customers. It’s the ability to show different content (including fill-ins) depending on what’s selected in a dropdown/pop-up menu.

More details here: [https://textexpander.com/learn/using/snippets/snippet-fill-ins/conditional-sections](https://textexpander.com/learn/using/snippets/snippet-fill-ins/conditional-sections)

Give it a try 🙂 We’d appreciate hearing how you are using it.

---

<div class="post-metadata">

**Author:** ![LiamJohnson](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@LiamJohnson](https://community.textexpander.com/u/LiamJohnson)\
**Post date:** [September 27, 2026, 7:45pm UTC](https://community.textexpander.com/t/help-creating-a-multiple-choice-with-conditional-output-options/235/6 "2026-09-27T19:45:59Z")

</div>

Yes, this kind of conditional logic is definitely possible using popups or choice variables in text expansion tools (like TextExpander or similar snippet managers).

You can achieve this by assigning variables or values to your popup choices, and then using conditional syntax (like if/else or ternary operators depending on your tool) later in the snippet text to switch between “her”, “me”, or “us”.

For example, if your popup assigns the choice to a variable named support:

If support equals option 1, output: “her”

If support equals option 2, output: “me”

Else, output: “us”

For managing conditional workflow rules and dynamic template rendering in web applications, [see more](https://lescobillcheck.pk/) for structured code examples.
