Dynamic number of characters for user input

Hi, not sure if this is where this question falls best.

The simplest way to explain what I am trying to achieve is a game of “hangman”. I have a database element which is the solution (for example “hangman”), that is already stored. On the user side, I’d like to underline the same number of characters as the solution (in this example, 7 underlined unfilled characters), as is done in a classic hangman game.

Is there a way to achieve this? I’ve tried storing the number of characters of the solution but not sure how to bring that back into the user text input. Similarly, on the input side, seems that number of characters cannot be dynamic.

Thanks,
Alina

Hi Alina!

Try using the Toolbox plugin to help you with this. It will allow you to generate a dynamic list of numbers that you can match up with the solution’s # of characters. I’ve created a basic concept here:

Editor: https://bubble.io/page?type=page&name=hangman&id=coaching-sandbox&tab=tabs-1

Preview: https://coaching-sandbox.bubbleapps.io/version-test/hangman?debug_mode=true

The toolbox plugin adds an element called “List of Numbers” to your element list. Add that to the page. You’ll see it in the editor link next to the input.


Gaby | Private coaching, courses, and tons of free resources
Become a VIP Member for immediate access to 100+ lessons, videos, webinars, and more

Thanks Gaby, that was exactly what I was looking for. Is it possible to have the cursor automatically select the next box each letter is filled in? I tried using a workflow for that but on mobile it doesn’t work automatically, it still requires me to manually select the next letter placeholder.