Clipboard – Clipboard contents only as a selectable optional addition

How can I add the contents of my personal clipboard as a selectable option?
Normally, I copy a customer's name to my clipboard and then select a text snippet that begins with a salutation like …

"Dear Mr. / Ms. / Customer" and then includes the
"customers name" (but only if it's available, which isn't always the case).

As a beginner with Text Blaze, I don't understand this at all yet. I'm coming from aText.

Hi,

Please give the snippet below a try.

  • It uses {formtoggle} to create a toggle field.
  • Then it uses {if} to create a condition for whether the toggle field is toggled on/off.
  • If it's on, then your clipboard contents are added in the snippet. If it's off, then I have it set to have a text field where you can just type the name (though you don't have to have that part if you don't want it).

Let me know if you have any questions :slight_smile:

Dear {formmenu: default=Mr.; Ms.; Customer; name=greeting} {formtoggle: name=Name from clipboard; default=no}{clipboard}{endformtoggle}{if: `name from clipboard`= no}{formtext: name=Name}{endif}

1 Like

That's exactly what I need :star_struck:

This snippet should, in my opinion, be included in the standard demo snippets.
Thank you so much!

2 Likes

In addition to Dylan's excellent suggestion, here's another variation, where the text field is pre-filled with the clipboard contents:

Dear {formmenu: default=Mr.; Ms.; Customer; name=greeting} {formtext: name=Name; default={clipboard}}

2 Likes

Thank you very much, but I need the clipboard as an option, as the name is not always available.

1 Like