# Question about chancing input

**URL:** <https://forum.bubble.io/t/question-about-chancing-input/241212>\
**Category:** Need help\
**Created:** [January 12, 2023, 5:41pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212 "2023-01-12T17:41:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 5:41pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/1 "2023-01-12T17:41:16Z")

</div>

Hi Community!  
I am having trouble making this function work, were I want my users to select wich one of the “template words” they want to use, and when they click on of the 4 choices, the choice name automatically filled in the input, any ideas for this?

 ![Schermafbeelding 2023-01-12 om 18.41.06](https://us1.discourse-cdn.com/bubble/original/3X/5/a/5ae7c70e14076a5ff1e79bc65f9f45ae6e9399ec.png)

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 5:44pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/2 "2023-01-12T17:44:56Z")

</div>

![Schermafbeelding 2023-01-12 om 18.44.34](https://us1.discourse-cdn.com/bubble/original/3X/7/9/79d8f26be518c4b3def82293fe5924fc039beaf1.png)  
 ![Schermafbeelding 2023-01-12 om 18.44.47](https://us1.discourse-cdn.com/bubble/original/3X/c/5/c5d9d036f9c6d73d803f444ef1f72ddd284f0b26.png)

Sort of this.

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [January 12, 2023, 6:09pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/3 "2023-01-12T18:09:59Z")

</div>

Hey @jona

I had the same use-case recently. The workaround I found was to copy the value to clipboard on click, and then paste it into the input manually.

Having the value immediately be added in the input without needing to paste is (to my knowledge) only possible through a bit of JS work.

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 12, 2023, 6:39pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/4 "2023-01-12T18:39:49Z")

</div>

Hi @jona 👋

This should be really simple with the **Insert at cursor position** plugin. 👍

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 7:40pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/5 "2023-01-12T19:40:27Z")

</div>

hi @rpetribu,  
Thanks for your reaction! It is kinda working, but not really like I want it to work, because you need to select an option in order to insert the text, but then the cursor is at the selecting option, so the value is also pasted at the wrong position (not after the text you wrote)

 ![Schermafbeelding 2023-01-12 om 20.40.19](https://us1.discourse-cdn.com/bubble/original/3X/7/6/76ba15a72691c822603f14b62b3f0bb4997ec7a7.png)

 ![Schermafbeelding 2023-01-12 om 20.38.55](https://us1.discourse-cdn.com/bubble/original/3X/9/c/9c64d6be9acae66e5b693c64c593b600ec39c8c3.png)

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 8:30pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/6 "2023-01-12T20:30:27Z")

</div>

@jona why don’t you set those variables outside the multiline input? IMO that’s better UI, and this will most likely solve your issue. Killing 2 birds with 1 stone 😉

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 8:33pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/7 "2023-01-12T20:33:05Z")

</div>

Hi Oliver,  
Thanks, but didnt solve the issue unfortunately.

 ![Schermafbeelding 2023-01-12 om 21.32.50](https://us1.discourse-cdn.com/bubble/original/3X/7/0/708bfddfc447530ed7c87c246a8883cc74acc027.png)

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 8:34pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/8 "2023-01-12T20:34:22Z")

</div>

Are those input fields & did you perhaps give them the same ID attribute?

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 8:39pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/9 "2023-01-12T20:39:24Z")

</div>

No, the idea is you select one of the values from te boxes e.a.g “Voornaam”, then it automatically get pasted at the line you were writing in the multiline input.

Please, what do you specify with ID attribute?

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 8:40pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/10 "2023-01-12T20:40:29Z")

</div>

@jona - Have you read the plugin instructions in the first place?

It seems to be working correctly for me, here’s how I’ve set it up…

DEMO: [play-app-player](https://play-app-player.bubbleapps.io/version-test/variables)  
EDITOR: [play-app-player | Bubble Editor](https://bubble.io/page?type=page&name=variables&id=play-app-player&tab=tabs-1)

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 8:44pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/11 "2023-01-12T20:44:02Z")

</div>

![Schermafbeelding 2023-01-12 om 21.43.18](https://us1.discourse-cdn.com/bubble/original/3X/d/6/d632a7530a83cd0375c82baad63b39cc2862e4b6.png)

I don’t see the option for the Attribution iD in my app, were I see you have the option to add the ID

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 8:46pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/12 "2023-01-12T20:46:37Z")

</div>

There’s another action that comes with this plugin, you should use that one instead. 🙂

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 8:47pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/13 "2023-01-12T20:47:53Z")

</div>

Ah ok, i see. Thanks, and how can I specify / create the attribute ID?

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 8:52pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/14 "2023-01-12T20:52:28Z")

</div>

You have to expose ID elements first → Settings \> General

 ![Scherm­afbeelding 2023-01-12 om 21.50.27](https://us1.discourse-cdn.com/bubble/original/3X/f/2/f2ddec1defe7d50b383adb52653a22367d8255c4.png)

Then you give your multiline input a random text value, for example, “test”. You then copy this text, and paste it into the first input of that plugin’s action.

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 12, 2023, 8:54pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/15 "2023-01-12T20:54:32Z")

</div>

Yes! As @oliviercoolen said…

You need to use this action:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/b/4b377090c36750c42226ec391f1e9b8fcff263bf.png)

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 8:57pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/16 "2023-01-12T20:57:56Z")

</div>

Great! Thanks for the solution @oliviercoolen, really helped me today!  
Also thanks to @rpetribu!

---

<div class="post-metadata">

**Author:** ![jona](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jona](https://forum.bubble.io/u/jona)\
**Post date:** [January 12, 2023, 9:04pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/17 "2023-01-12T21:04:24Z")

</div>

And a other question @oliviercoolen 😉  
I want certain words be colored, for example the word; “Voornaam”, but when I try to set a condition for this, the whole multiline input font color is changing, do you know a way to just color a specific word within the input?

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [January 12, 2023, 9:09pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/18 "2023-01-12T21:09:56Z")

</div>

That’s not possible I’m afraid, at least not without some custom code.

What you can do instead is have a “preview” button. This button can open a popup, for example, that displays a repeating group where the `Data type = text` and the `Data source = multiline input ... 's value:splitby( )` → (so split the words using a space)

Then on the text within that repeating group, you can have a conditional that says, "when current cell’s text is Voornaam → Change font color to…

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 12, 2023, 9:30pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/19 "2023-01-12T21:30:31Z")

</div>

> [@jona](#):
>
> I want certain words be colored, for example the word; “Voornaam”, but when I try to set a condition for this, the whole multiline input font color is changing, do you know a way to just color a specific word within the input?

You can do it using the `:find and replace` action…

Take a look [here](https://teste-ez.bubbleapps.io/version-test/text_color_241212?debug_mode=true) for some inspiration 😉

[Editor](https://bubble.io/page?type=page&name=text_color_241212&id=teste-ez&tab=tabs-1)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 23, 2023, 5:41pm UTC](https://forum.bubble.io/t/question-about-chancing-input/241212/20 "2023-03-23T17:41:49Z")

</div>

Closed on March 23, 2023, 5:41pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
