# Associating text field to keypress numbers

**URL:** <https://community.blaze.today/t/associating-text-field-to-keypress-numbers/68915>\
**Category:** Questions and Help\
**Created:** [October 27, 2026, 6:34pm UTC](https://community.blaze.today/t/associating-text-field-to-keypress-numbers/68915 "2026-10-27T18:34:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbourque4](https://community.blaze.today/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@sbourque4](https://community.blaze.today/u/sbourque4)\
**Post date:** [October 27, 2026, 6:34pm UTC](https://community.blaze.today/t/associating-text-field-to-keypress-numbers/68915/1 "2026-10-27T18:34:37Z")

</div>

Hello!

I'm working on an automation program that would output certain keypress depending on a number added in a text field.

Ex : if a user types "3" in the text field, the keypress should be key:3, if the user types "12" the keypresses should be key:1 key:2  
Etc.

That's because the medical app we use cannot work with numbers in s text field, if I want to add refills for a prescription for example.

---

<div class="post-metadata">

**Author:** ![Ashu\_Gupta](https://community.blaze.today/user_avatar/community.blaze.today/ashu_gupta/32/15738_2.png) [@Ashu\_Gupta](https://community.blaze.today/u/Ashu_Gupta)\
**Post date:** [October 27, 2026, 10:51pm UTC](https://community.blaze.today/t/associating-text-field-to-keypress-numbers/68915/2 "2026-10-27T22:51:14Z")

</div>

Hi @sbourque4, this is a great idea!

You may want to consider parsing through a string input with some of Text Blaze's [string functions](https://blaze.today/formulas/reference/#text-string-functions). I think `contains` or `search` may be useful here. You might also want to consider using a [code block](https://blaze.today/formulas/blocks), as its `for` function can loop through a string.

Good luck with your work!

---

<div class="post-metadata">

**Author:** ![VinodGubbala](https://community.blaze.today/user_avatar/community.blaze.today/vinodgubbala/32/3615_2.png) [@VinodGubbala](https://community.blaze.today/u/VinodGubbala)\
**Post date:** [October 28, 2026, 1:13am UTC](https://community.blaze.today/t/associating-text-field-to-keypress-numbers/68915/3 "2026-10-28T01:13:12Z")

</div>

@sbourque4  
Adding to Ashu, you can try this example.

{formtext: name=keys; default=234}{repeat: for key in split(keys, "")}{key: {=key}}{endrepeat}
